This documentation is archived and is not being maintained.

ControlDesigner.ID Property

Gets or sets the ID string for the control.

[Visual Basic]
Public Overridable Property ID As String
[C#]
public virtual string ID {get; set;}
[C++]
public: __property virtual String* get_ID();
public: __property virtual void set_ID(String*);
[JScript]
public function get ID() : String;
public function set ID(String);

Property Value

The ID string for the control.

Remarks

This property is used internally by the designer and for interaction with the Properties window. This property shadows the run-time ID property.

Example

[Visual Basic] The following code example shows a class that derives from the ControlDesigner class. The class's constructor sets the ID property equal to the Text property value of the control that the designer is associated with.

[Visual Basic] 
' Create a constructor for the designer class
' When an instance of the designer is created,
' the Text property of the instance of a Simple control
' is set to the designer's ID property.
' the designer is called.
Public Sub New()
  simpleControl = CType(Component, Simple)      
  simpleControl.Text = Me.ID
End Sub

[C#, C++, JScript] No example is available for C#, C++, or JScript. To view a Visual Basic example, click the Language Filter button Language Filter in the upper-left corner of the page.

Requirements

Platforms: Windows 2000, Windows XP Professional, Windows Server 2003 family

.NET Framework Security: 

See Also

ControlDesigner Class | ControlDesigner Members | System.Web.UI.Design Namespace | ID

Show: