I need to call a validator to show an error message from JavaScript
For Example:
I have a textbox in which i take time as input and a Button to submit the value.
I have a minimum time and maximum time.
I’m validating the time textbox using JavaScript and using an alert message to show if there is an error in the time entered
Now instead of showing the alert box I want to call the validation callout extender
to show the error message
Can you help me out?
Have you tried using ASPX validators, these solve javascript and also server side parts.
You can then just ask page.IsValid.
here is some more information about ASPX validator controls
Validators are pretty easy to use, as they support also regular expressions and own functions. But sometimes you’ve to use two validators on one field. e.g. requiredFieldValidator and Compare validator
http://asp.net-tutorials.com/validation/required-field-validator/
http://msdn.microsoft.com/en-us/library/bwd43d0x.aspx
http://msdn.microsoft.com/en-us/library/debza5t0.aspx