Here Mudassar Ahmed Khan has explained with an example, how to implement confirm before Submit on ASP.Net Button Click using JavaScript.
The JavaScript Confirmation Message Box will be displayed on Button Click using ClientScript.RegisterOnSubmitStatement function.
When the Button is clicked, the Confirmation Message Box with OK (Yes) and Cancel (No) buttons will be displayed, if the User clicks OK (Yes) button only then the Form will be submitted i.e. Click event will fire.
↧