System.Web.UI.Design.WebFormsRootDesigner.AddControlToDocument Method

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

Syntax

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

Parameters

newControl
The control to add to the Web Forms page.
referenceControl
The control relative to which newControl is added.
location
A System.Web.UI.Design.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.

Requirements

Namespace: System.Web.UI.Design
Assembly: System.Design (in System.Design.dll)
Assembly Versions: 2.0.0.0