BaseValidator.CheckControlValidationProperty(String, String) Método

Definição

Verifica se o controle especificado está na página e contém propriedades de validação.Verifies whether the specified control is on the page and contains validation properties.

protected:
 void CheckControlValidationProperty(System::String ^ name, System::String ^ propertyName);
protected void CheckControlValidationProperty (string name, string propertyName);
member this.CheckControlValidationProperty : string * string -> unit
Protected Sub CheckControlValidationProperty (name As String, propertyName As String)

Parâmetros

name
String

O controle a ser verificado.The control to verify.

propertyName
String

Texto adicional para descrever a origem da exceção, se uma exceção for gerada do uso deste método.Additional text to describe the source of the exception, if an exception is thrown from using this method.

Exceções

O controle especificado não foi encontrado.The specified control is not found.

- ou --or-

O controle especificado não tem um atributo ValidationPropertyAttribute associado a ele; portanto, ele não pode ser validado com um controle de validação.The specified control does not have a ValidationPropertyAttribute attribute associated with it; therefore, it cannot be validated with a validation control.

Comentários

O CheckControlValidationProperty método é um método auxiliar usado principalmente pelo ControlPropertiesValid método para verificar se o controle especificado está na página e contém propriedades de validação.The CheckControlValidationProperty method is a helper method used primarily by the ControlPropertiesValid method to verify whether the specified control is on the page and contains validation properties. Esse método não retorna um valor para relatar o resultado.This method does not return a value to report the result. Em vez disso, ele gera uma exceção quando a verificação falha.Instead, it throws an exception when verification fails.

Observação

Esse método é usado principalmente por desenvolvedores de controle.This method is used primarily by control developers.

Aplica-se a

Confira também