Does the validation controls in ASP.NET works in server side as well as client side? or it is for client side validation only?
Thanks
Does the validation controls in ASP.NET works in server side as well as client side? or it is for client side validation only?
Thanks
ASP.NET validation control perform both client side
and server side
validation. EnableClientValidation
is the property to disable
client side validation.
Quoted from MSDN Document for ASP.NET Validation Controls
Validation controls perform input checking in server code. When the user submits a page to the server, the validation controls are invoked to check the user input, control by control. Validation occurs after page initialization (that is, after view state and postback data have been processed) but before any change or click event handlers are called.
ASP.NET performs validation on the server even if the validation controls have already performed it on the client, so that you can test for validity within your server-based event handlers.
You can invoke validation in your own code by calling a validation control's Validate method