Confirmation dialog to a GridView delete option

Actually it is not possible to attach client confirmation to the delete command filed. But it is pretty easy to do this by template field. The only think you have to do is to set command name to be "Delete" (CommandName="Delete"). GridView event handlers are responsible for the other things of delete process.

<asp:LinkButton ID="delete1"
"return confirm('Are you sure you want to delete this record?');"

No comments:

Post a Comment