Add a Submit Button Confirmation to an ASP.NET Web Form

I’ve been asked many times how to add a confirmation dialog for a simple (or complex, why not?) ASP.NET web form. It’s simple:

  • Find the OnClientClick property of the button control
  • Type return confirm(‘are you sure?’) as the value of the property

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.