System.Web.UI.WebControls.BaseValidator.EnableClientScript Property

Gets or sets a value indicating whether client-side validation is enabled.

Syntax

[System.ComponentModel.DefaultValue(true)]
[System.Web.UI.Themeable(false)]
public bool EnableClientScript { set; get; }

Value

Documentation for this section has not yet been entered.

Remarks

Use the BaseValidator.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 allows DHTML-supported browsers (such as Microsoft 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 the round trip of information necessary for server-side validation.

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 control-by-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.

This property cannot be set by themes or style sheet themes. For more information, see System.Web.UI.ThemeableAttribute and ASP.NET Themes Overview.

Requirements

Namespace: System.Web.UI.WebControls
Assembly: System.Web (in System.Web.dll)
Assembly Versions: 1.0.5000.0, 2.0.0.0