BaseValidator.Text Propriedade
Definição
Obtém ou define o texto exibido no controle de validação quando a validação falha.Gets or sets the text displayed in the validation control when validation fails.
public:
virtual property System::String ^ Text { System::String ^ get(); void set(System::String ^ value); };
[System.Web.UI.PersistenceMode(System.Web.UI.PersistenceMode.InnerDefaultProperty)]
public override string Text { get; set; }
[<System.Web.UI.PersistenceMode(System.Web.UI.PersistenceMode.InnerDefaultProperty)>]
member this.Text : string with get, set
Public Overrides Property Text As String
Valor da propriedade
O texto exibido no controle de validação quando a validação falha.The text displayed in the validation control when validation fails. O padrão é uma cadeia de caracteres vazia (""), que indica que essa propriedade não está definida.The default is an empty string (""), which indicates that this property is not set.
- Atributos
Comentários
Use a Text propriedade para especificar o texto a ser exibido em um controle de validação quando a validação falhar.Use the Text property to specify the text to display in a validation control when validation fails. Você também pode exibir um resumo de todos os controles que apresentam falha na validação na página usando um ValidationSummary controle.You can also display a summary of all controls that fail validation in the page by using a ValidationSummary control. Para especificar o texto a ser exibido em um ValidationSummary controle, use a ErrorMessage propriedade.To specify the text to display in a ValidationSummary control, use the ErrorMessage property.
Observação
Se você definir a ErrorMessage Propriedade sem definir a Text propriedade, o valor da ErrorMessage propriedade também será exibido no controle de validação.If you set the ErrorMessage property without setting the Text property, the value of the ErrorMessage property is also displayed in the validation control.