This documentation is archived and is not being maintained.

Control Constructor

Initializes a new instance of the Control class.

[Visual Basic]
Public Sub New()
public Control();
public: Control();
public function Control();


[Visual Basic, C#, C++] The following example demonstrates using the Control constructor to instantiate a custom server control, MyControl.

[Visual Basic] 
' Create an instance of 'MyControl' class.
Protected myControl As New MyControl()

// This example creates an instance of the 'MyControl' class.
protected MyControl myControl = new MyControl();

// This example creates an instance of the 'MyControl' class.
MyControl* myControl = new MyControl();

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


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

See Also

Control Class | Control Members | System.Web.UI Namespace