System.Web.UI.WebControls.BaseValidator.IsValid Property

Gets or sets a value that indicates whether the associated input control passes validation.

Syntax

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

Value

Documentation for this section has not yet been entered.

Remarks

Use the BaseValidator.IsValid property to determine whether the associated input control passes validation.

Note:

Because the default value of this property is true, it will return true if you query this property before validation is performed. For example, this might occur if you attempt to use this property in the System.Web.UI.Control.Load event of a page.

The BaseValidator.IsValid property is evaluated only when the BaseValidator.Validate method is called. You can call the BaseValidator.Validate method for each validation control on the page individually, or call all of them at once by using the System.Web.UI.Page.Validate method. Button controls with their CausesValidation property set to true will also call the System.Web.UI.Page.Validate method.

Note:

It is possible to change the value of this property manually after validation has taken place. This allows you to override the validation result, if necessary.

The System.Web.UI.Page.IsValid property for the page is set to true only if the BaseValidator.IsValid property for each validation control on the page is also set to true.

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