Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
Control Constructor
Collapse the table of content
Expand the table of content

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

© 2015 Microsoft