ValidationPropertyAttribute.Name Proprietà

Definizione

Ottiene il nome della proprietà di convalida del controllo server ASP.NET.

public:
 property System::String ^ Name { System::String ^ get(); };
public string Name { get; }
member this.Name : string
Public ReadOnly Property Name As String

Valore della proprietà

Il nome della proprietà di convalida.

Esempio

L'esempio di codice seguente illustra l'uso della classe durante la ValidationPropertyAttribute creazione di un controllo personalizzato.

[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

Si applica a