System.Web.UI.WebControls Namespace BaseValidator Class
Sets or retrieves a value specifying whether client-side validation is enabled.
Inline |
<asp:validator enableclientscript [ = true | false ] ... > |
Script |
Validator.EnableClientScript [ = true | false ] |
This property accepts or returns only a boolean value: true if client-side validation is enabled; otherwise false. Default value is true.
Use the EnableClientScript property to specify whether client-side validation is enabled.
Validation controls always perform validation on the server. They also have complete client-side implementation that allow DHTML supported browsers ( such as Internet Explorer 4.0 and later ) to perform validation on the client.
Client-side validation enhances the validation process by checking user input before it is sent to the server. This allows errors to be detected on the client before the form is submitted, avoiding needless round trips to the server.
By default, this value is set to true, which enables client-side validation if the browser supports it. You can disable client-side validation on a per-control basis. 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.
BaseValidator Members Base Validation Control Properties