System.Web.UI.WebControls.BaseValidator.Text Property

Gets or sets the text displayed in the validation control when validation fails.

Syntax

[System.ComponentModel.DefaultValue("")]
[System.Web.UI.PersistenceMode(System.Web.UI.PersistenceMode.InnerDefaultProperty)]
public override string Text { set; get; }

Value

Documentation for this section has not yet been entered.

Remarks

Use the BaseValidator.Text property to specify the text to display in a validation control when validation fails. You can also display a summary of all controls that fail validation in the page by using a System.Web.UI.WebControls.ValidationSummary control. To specify the text to display in a System.Web.UI.WebControls.ValidationSummary control, use the BaseValidator.ErrorMessage property.

Note:

If you set the BaseValidator.ErrorMessage property without setting the BaseValidator.Text property, the value of the BaseValidator.ErrorMessage property is also displayed in the validation control.

Requirements

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