I don't know very much about c#. I am updating a page built by someone else and I want to add a script to a button web control. The form is using c#'s validation and when I look at the returned markup from opening the page, there already is an onclick event handler for the postback submission and validation. So how do I add my own as well? Thanks for your help
2 Answers
Here is the official ASP.NET QuickStart Tutorial for ASP.NET Validation Controls. By the way if you're looking for your custom validation, check CustomValidator Control, specifically it's ClientValidationFunction property.
Comments
You can use the button's OnClientClick property to place custom clientside script. Documentation on it here.