Export (0) Print
Expand All
This topic has not yet been rated - Rate this topic

Control Constructor

Initializes a new instance of the Control class.

[Visual Basic]
Public Sub New()
[C#]
public Control();
[C++]
public: Control();
[JScript]
public function Control();

Example

[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()

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

[C++] 
// 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.

Requirements

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

See Also

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

Did you find this helpful?
(1500 characters remaining)
Thank you for your feedback
Show:
© 2014 Microsoft. All rights reserved.