System.Web.UI.Design.ControlParser.ParseTemplate Method

Parses the specified template markup and creates an System.Web.UI.ITemplate interface.

Syntax

public static System.Web.UI.ITemplate ParseTemplate (System.ComponentModel.Design.IDesignerHost designerHost, string templateText, string directives)

Parameters

designerHost
An System.ComponentModel.Design.IDesignerHost instance that is the designer host for the page.
templateText
A string containing the template markup.
directives
Any directives to add to the beginning of the code for the template.

Returns

An System.Web.UI.ITemplate instance created by parsing templateText.

Remarks

The ControlParser.ParseTemplate(System.ComponentModel.Design.IDesignerHost, string, 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.

Requirements

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