01.
protected
void
GridView1_RowDataBound(
object
sender,
02.
GridViewRowEventArgs e)
03.
{
04.
if
(e.Row.RowType == DataControlRowType.DataRow)
05.
{
06.
LinkButton l = (LinkButton)e.Row.FindControl(
"LinkButton1"
);
07.
l.Attributes.Add(
"onclick"
,
"javascript:return "
+
08.
"confirm('Are you sure you want to delete this record "
+
09.
DataBinder.Eval(e.Row.DataItem,
"CategoryID"
) +
"')"
);
10.
}
11.
}