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

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


WebFormsRootDesigner.AddControlToDocument Method

Definition

When overridden in a derived class, adds a Web server control to the Web Forms page.

C#
public abstract string AddControlToDocument(System.Web.UI.Control newControl, System.Web.UI.Control referenceControl, System.Web.UI.Design.ControlLocation location);

Parameters

newControl
Control

The control to add to the Web Forms page.

referenceControl
Control

The control relative to which newControl is added.

location
ControlLocation

A ControlLocation value that indicates the location for newControl relative to referenceControl.

Returns

The ID of the control that was added.

Remarks

Although a control might already have an ID assigned to it, if there is already a control in the Web Forms page with the same ID, a new ID is assigned.

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