System.Web.UI.Design.ControlParser.ParseControls Method

Creates an array of controls from the specified markup using the specified designer host.

Syntax

public static System.Web.UI.Control[] ParseControls (System.ComponentModel.Design.IDesignerHost designerHost, string controlText)

Parameters

designerHost
An System.ComponentModel.Design.IDesignerHost instance that is the designer host for the page.
controlText
A string that represents a collection of markup for controls.

Returns

An array of System.Web.UI.Control elements, parsed from controlText; otherwise, null, if the parser cannot build the controls.

Remarks

The ControlParser.ParseControls(System.ComponentModel.Design.IDesignerHost, string) method accesses the string representing the register directives on the ASP.NET Web page using the services of the designer host. Designer host services are acquired through the WebFormsRootDesigner.ReferenceManager property of the ControlDesigner.RootDesigner object, or if that is not available, the System.Web.UI.Design.IWebFormReferenceManager service.

The ControlParser.ParseControls(System.ComponentModel.Design.IDesignerHost, string) method throws an exception if the parser cannot build the controls from the controlText parameter.

Requirements

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