How to: Disable Validation for ASP.NET Server Controls
You might want to bypass validation under certain circumstances. For example, you might have a page in which users should be able to post even if they did not fill out all the validated fields correctly. You can set an ASP.NET server control to bypass validation on both the server and the client, or just on the client.
By default, ASP.NET Web pages perform request validation to ensure that user input does not include script or HTML elements. You can disable this feature explicitly. For more information, see.
You can also disable a validation control so that it is not rendered to the page at all and no validation takes place using that control.
If you want to perform validation on the server but not on the client, you can set an individual validation control to not emit client-side script. This is useful if dynamic updating on the client creates problems with the layout of the page, or if you want to execute some server code before validation takes place.
To disable validation in a specific control
Set the control'sproperty to false.
The following example shows how you can create a Cancel button that bypasses a validation check:
To disable a validation control
Set the validation control's Enabled property to false.
To disable client-side validation
Set the validation control's EnableClientScript property to false.