i have a asp:button that will fire a delete and want to have a client side javascript are you sure pop-up prevent any accidents.
whats the javascript to handle this?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
You can add the javascript to the OnClientClick() event of the button… the key is to return false if you want to cancel the event. If you return false, the OnClick will not fire.
Alternately, you can call a method in javascript
Where MyDeleteConfirm() does something more elaborate, but returns false if you don’t want to delete.