Export (0) Print
Expand All

ValidationPropertyAttribute.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
)
public ValidationPropertyAttribute (
	String name
)
public function ValidationPropertyAttribute (
	name : String
)
Not applicable.

Parameters

name

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;
      }
   }
   
}

/** @attribute ValidationPropertyAttribute("Message")
 */
public class MessageControl extends Label
{
    private int _message = 0;

    /** @property 
     */
    public int get_Message()
    {
        return _message;
    } //get_Message

    /** @property 
     */
    public void set_Message(int value)
    {
        _message = value;
    } //set_Message
} //MessageControl

Windows 98, Windows Server 2000 SP4, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition

The Microsoft .NET Framework 3.0 is supported on Windows Vista, Microsoft Windows XP SP2, and Windows Server 2003 SP1.

.NET Framework

Supported in: 3.0, 2.0, 1.1, 1.0

Community Additions

ADD
Show:
© 2014 Microsoft