Επεξεργασία

Κοινή χρήση μέσω


ControlParser.ParseTemplate Method

Definition

Creates an ITemplate interface from the specified template markup.

Overloads

ParseTemplate(IDesignerHost, String)

Creates an ITemplate interface from the specified template markup.

ParseTemplate(IDesignerHost, String, String)

Parses the specified template markup and creates an ITemplate interface.

ParseTemplate(IDesignerHost, String)

Creates an ITemplate interface from the specified template markup.

public:
 static System::Web::UI::ITemplate ^ ParseTemplate(System::ComponentModel::Design::IDesignerHost ^ designerHost, System::String ^ templateText);
public static System.Web.UI.ITemplate ParseTemplate (System.ComponentModel.Design.IDesignerHost designerHost, string templateText);
static member ParseTemplate : System.ComponentModel.Design.IDesignerHost * string -> System.Web.UI.ITemplate
Public Shared Function ParseTemplate (designerHost As IDesignerHost, templateText As String) As ITemplate

Parameters

designerHost
IDesignerHost

An IDesignerHost instance that is the designer host for the page.

templateText
String

A string containing the template markup.

Returns

An ITemplate instance created by parsing templateText.

Exceptions

designerHost is null.

Remarks

The ParseTemplate 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 ReferenceManager property of the RootDesigner object, or if that is not available, the IWebFormReferenceManager service.

See also

Applies to

ParseTemplate(IDesignerHost, String, String)

Parses the specified template markup and creates an ITemplate interface.

public:
 static System::Web::UI::ITemplate ^ ParseTemplate(System::ComponentModel::Design::IDesignerHost ^ designerHost, System::String ^ templateText, System::String ^ directives);
public static System.Web.UI.ITemplate ParseTemplate (System.ComponentModel.Design.IDesignerHost designerHost, string templateText, string directives);
static member ParseTemplate : System.ComponentModel.Design.IDesignerHost * string * string -> System.Web.UI.ITemplate
Public Shared Function ParseTemplate (designerHost As IDesignerHost, templateText As String, directives As String) As ITemplate

Parameters

designerHost
IDesignerHost

An IDesignerHost instance that is the designer host for the page.

templateText
String

A string containing the template markup.

directives
String

Any directives to add to the beginning of the code for the template.

Returns

An ITemplate instance created by parsing templateText.

Exceptions

designerHost is null.

Remarks

The ParseTemplate 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 ReferenceManager property of the RootDesigner object, or if that is not available, the IWebFormReferenceManager service.

See also

Applies to