GenericWebPart Constructor (Control^)
.NET Framework (current version)
Initializes a new instance of a GenericWebPart control by passing in a reference to a control that becomes the child control.
Assembly: System.Web (in System.Web.dll)
Parameters
- control
-
Type:
System.Web.UI::Control^
A server control that becomes the child control of the GenericWebPart control instance.
| Exception | Condition |
|---|---|
| ArgumentNullException | control is null. |
| ArgumentException |
The GenericWebPart(Control^) constructor is called by the WebPartManager control in its CreateWebPart method, to initialize an instance of a GenericWebPart control by passing in a reference to a child server control. After the GenericWebPart object is created, you can reference the child control using the ChildControl property.
.NET Framework
Available since 2.0
Available since 2.0
Show: