Export (0) Print
Expand All

ValidationPropertyAttribute Constructor

Initializes a new instance of the ValidationPropertyAttribute class.

Namespace:  System.Web.UI
Assembly:  System.Web (in System.Web.dll)

public ValidationPropertyAttribute(
	string name
)

Parameters

name
Type: System.String

The name of the validation property.

The following code example demonstrates using the ValidationPropertyAttribute class when creating a custom control.

[ValidationPropertyAttribute("Message")]
public class MessageControl : Label
{
   private int _message = 0;
   public int Message
   {
      get 
      {
         return _message;
      }
      set
      {
         _message = value;
      }
   }

}

.NET Framework

Supported in: 4.6, 4.5, 4, 3.5, 3.0, 2.0, 1.1
Show:
© 2015 Microsoft