WebFormsRootDesigner.AddControlToDocument Metod

Definition

När du åsidosättas i en härledd klass lägger du till en webbserverkontroll på sidan Webbformulär.

public:
 abstract System::String ^ AddControlToDocument(System::Web::UI::Control ^ newControl, System::Web::UI::Control ^ referenceControl, System::Web::UI::Design::ControlLocation location);
public abstract string AddControlToDocument(System.Web.UI.Control newControl, System.Web.UI.Control referenceControl, System.Web.UI.Design.ControlLocation location);
abstract member AddControlToDocument : System.Web.UI.Control * System.Web.UI.Control * System.Web.UI.Design.ControlLocation -> string
Public MustOverride Function AddControlToDocument (newControl As Control, referenceControl As Control, location As ControlLocation) As String

Parametrar

newControl
Control

Kontrollen som ska läggas till på sidan Webbformulär.

referenceControl
Control

Kontrollen i förhållande till vilken newControl läggs till.

location
ControlLocation

Ett ControlLocation värde som anger platsen för newControl i förhållande till referenceControl.

Returer

ID:t för kontrollen som lades till.

Kommentarer

Även om en kontroll kanske redan har tilldelats ett ID, tilldelas ett nytt ID om det redan finns en kontroll på sidan Webbformulär med samma ID.

Gäller för

Se även