System.Web.UI.WebControls.CustomValidator.ValidateEmptyText Property

Gets or sets a Boolean value indicating whether empty text should be validated.

Syntax

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

Value

Documentation for this section has not yet been entered.

Remarks

Each validator can be associated with a targeted control. In previous versions of the .NET Framework, if the targeted control had an empty string value, such as a TextBox.Text property having a value of string.Empty, the validator (except for the System.Web.UI.WebControls.RequiredFieldValidator validator) would not evaluate the targeted control and would simply return that the validation passed.

The CustomValidator.ValidateEmptyText property is new for the .NET Framework version 2.0. If CustomValidator.ValidateEmptyText is set to true, the validator evaluates the control's value (using the criteria specified to the System.Web.UI.WebControls.CustomValidator control) and returns the validation results. This property allows developers to evaluate the results of a System.Web.UI.WebControls.CustomValidator control regardless of the value of the targeted control.

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: 2.0.0.0