//Add delete msgbox to each row containing field
//information to identify the row
{
if (e.Row.RowType == DataControlRowType.DataRow)
{
// reference the Delete ImageButton
ImageButton ib = (ImageButton)e.Row.FindControl(“ibDelete”);
ib.Attributes.Add(“onclick”,“javascript:return ” +
confirm(’Are you sure about deleting ” +
DataBinder.Eval(e.Row.DataItem, ColomnName) + “?’);”);
}
}
OR
Add New Client Click property of button
return confirm(’Are you sure about deleting ”);
OR
Use Ajax Extender for confirmation box
ImageUrl=”~/Images/icon-delete.gif” />
ConfirmText=’Are you sure about deleting this record?’ />
ItemTemplate>
asp:TemplateField>
No comments:
Post a Comment