ValidationPropertyAttribute(String) 생성자

정의

ValidationPropertyAttribute 클래스의 새 인스턴스를 초기화합니다.

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)

매개 변수

name
String

유효성 검사 속성의 이름입니다.

예제

다음 코드 예제는 ValidationPropertyAttribute 사용자 지정 컨트롤을 만들 때 클래스입니다.

[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

적용 대상