For adding a delete prompt, you would need to bind the JavaScript to prompt for this alert during the
ItemDataBound
event of the datagrid (or
RowDatabound
of Gridview).
In this event, while the data is binded row by row - add something like:
LinkButton l = (LinkButton)e.Row.FindControl("LinkButton1");
l.Attributes.Add("onclick", "javascript:return " +
"confirm('Are you sure you want to delete this record')");
Alternatively,
if the link button in ItemTemplate of datagrid has OnclientClick event exposed (which is present in ASP.NET2.0 onwards), you can add something like:
OnClientClick = 'return confirm("Are you sure you want to delete this entry?");'
Try!