ValidationPropertyAttribute(String) Construtor
Definição
Importante
Algumas informações dizem respeito a um produto pré-lançado que pode ser substancialmente modificado antes de ser lançado. A Microsoft não faz garantias, de forma expressa ou implícita, em relação à informação aqui apresentada.
Inicializa uma nova instância da ValidationPropertyAttribute classe.
public:
ValidationPropertyAttribute(System::String ^ name);
public ValidationPropertyAttribute(string name);
new System.Web.UI.ValidationPropertyAttribute : string -> System.Web.UI.ValidationPropertyAttribute
Public Sub New (name As String)
Parâmetros
- name
- String
O nome da propriedade de validação.
Exemplos
O exemplo de código seguinte demonstra o uso da ValidationPropertyAttribute classe ao criar um controlo personalizado.
[ValidationPropertyAttribute("Message")]
public class MessageControl : Label
{
private int _message = 0;
public int Message
{
get
{
return _message;
}
set
{
_message = value;
}
}
}
<ValidationPropertyAttribute("Message")> Public Class MessageControl
Inherits Label
Private _message As Integer = 0
Public Property Message() As Integer
Get
Return _message
End Get
Set(ByVal Value As Integer)
_message = Value
End Set
End Property
End Class