Читати англійською Редагувати

Поділитися через


GenericWebPart(Control) Constructor

Definition

Initializes a new instance of a GenericWebPart control by passing in a reference to a control that becomes the child control.

C#
protected internal GenericWebPart(System.Web.UI.Control control);

Parameters

control
Control

A server control that becomes the child control of the GenericWebPart control instance.

Exceptions

control is null.

control is of type WebPart.

-or-

control has a null or empty ID property.

-or-

control has been output-cached.

Remarks

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.

Applies to

Продукт Версії
.NET Framework 2.0, 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1

See also