Click here to Skip to main content
15,886,037 members
Please Sign up or sign in to vote.
5.00/5 (1 vote)
See more:

I want to display an alert while deleting a record in GridView if the user clicks ok then only the record has to be deleted.

Can someone please help me out regarding this issue?

Posted
Updated 25-Aug-09 10:10am
v2

You can simply do it in RowDataBound Event of GridView. where you need to find control add the JavaScript onlick for that button/link.

Let me know if you need any further clarrification.

 
Share this answer
 
function ConfirmDelete()<br />{<br />return confirm('Do you want to delete?';<br />}<br />


at this to onclick attribute of the delete button.

 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900