If you are using DataGrid or GridView in ASP.Net, we may require to display a confirmation, like when you are deleting a record. This code will help to display confirmation dialogs from Client side, with ASP.Net Datagrid control or Gridview control etc.
<span onclick="return confirm('Are you sure you want to delete this record?');">
<asp:linkbutton runat="server" id="Delete" CommandName="Delete"
commandArgument='<%#Container.DataItem("field")%>' Text="Delete" />
</span>