protected void gvRoomTypes_RowDataBound(object sender, GridViewRowEventArgs e)
{
if(e.Row.RowType==DataControlRowType.DataRow)
{
//添加删除确认
ImageButton imgbtn = e.Row.FindControl("imgbtnDe") as ImageButton;
imgbtn.Attributes.Add("onclick", "return confirm('您确认要删除吗?');");
}
}
http://hi.baidu.com/chenaran/blog/item/340d155843fa49262934f069.html
自己好好地看吧,好多方法随便选个就行。
祝您愉快!