Hi
You can call the javascript function on the OnClientClick event of the Control or you can directly call the confirmation script on the onClientClick event.
First way
<script language="javascript">
function delconfirm()
{
return confirm("Are you sure you want to delete this/these record/s?");
}
</script>
<asp:TemplateField HeaderText="Delete">
<ItemStyle HorizontalAlign="Center" Width="5%" />
<ItemTemplate>
<asp:ImageButton ID="btndelete" runat="server" CommandName="delete_record" CommandArgument='<%# Eval("id") %>'
Height="20px" ImageUrl="~/images/button-delete.gif" Width="55px" OnClientClick="return delconfirm();" />
</ItemTemplate>
<HeaderStyle HorizontalAlign="Center" Width="5%" />
</asp:TemplateField>
Second Way
<asp:LinkButton ID="lnkDelete" runat="server" OnClientClick="return confirm('Are you sure want to delete this item(s) ?')"></asp:LinkButton>