I have a grid view in which I have a button feild for deleting that particular row in the grid view, using the GridView_RowDeleting() event.
So when that particular row gets renders it’s such
<input type="button" value="Delete" onclick="javascript:__doPostBack('ctl00$ContentPlaceHolderBodyMasterPage$grdvwUsers','Delete$0')" class="delete" />
The delete functionality works fine.
But I want to show a confirmation message on this button click whether to delete the user or not.
For that I have added query code for that to display the confirmation message, but thats not working , don’t know why,
$(".delete").click(function(e) {
// code for displaying the confirmation dialog
});
Please help me out, thanks !
The problem is that the postback is executed prior to the click handler. The following works, but it is ugly (test code here):
I would suggest using the Confirm Button Extender from the Ajax Control Toolkit