I'm currently coding a button which will delete a record from a database if clicked. However, I want some sort of confirmation after they click it so there are no accidents. I was imagining a popup box that tells them they are about to delete this record with two buttons cancel and OK. If cancelled, nothing happens, but if OK is pressed, then the server would execute the delete as coded. How would I do this in asp/vb?
Javascript – How to ask the user for confirmation of an action with a popup box
asp.netjavascriptvb.net
Related Question
- Javascript – How to change the href attribute for a hyperlink using jQuery
- Javascript – How to loop through a plain JavaScript object with the objects as members
- Javascript – How to implement a confirmation dialog for critical action
- Javascript – How to clear the canvas for redrawing
- Javascript – How to dispatch a Redux action with a timeout
Best Solution
Here is a button with a confirmation message :
Here is the way to add confirm client script at server side :