Required field validator not validating
27-May-2020 05:02
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!
I have a textbox in a template field on a details view.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!I've set the Control To Validate and it works flawlessly when there is no code inside the btn Submit Checkup_Click but if I try to put a code inside it, it will go forward and disregard the Required Field Validator.
which will make it not call the client side validation.
The form is quite simple and there are no Causes Validation="false" attributes set.