0

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 2

3

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.

Sign up to request clarification or add additional context in comments.

Comments

1

You can use the button's OnClientClick property to place custom clientside script. Documentation on it here.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.