I'm sure that all the attributes of the controls makes sense by now, so I won't go into details about them. You should see something like this: If your browser supports Java Script, which most modern browers do, then you will notice that the page is not being posted back to the server - the validation is performed clientside! To see how it feels, you can add enableclientscript="false" to the Required Field Validator and try again.Now you will see the browser posting back to the server, but the result will be the same - the validator still works!Browser support[^] is pretty good, with the exception of IE9 and earlier.
Let's give it a try, and add a Required Field Validator to our page.
This is very important, since this code WILL be reached if the clientside validation is not used, for some reason.
We will also add a Text Box to validate, as well as a button to submit the form with.
Actually, that's all we need to test the most basic part of the Required Field Validator. Validation is only performed serverside if necessary!
How To: Use Regular Expressions to Constrain Input in ASP.
The Required Field Validator is actually very simple, and yet very useful.