System.Web.UI.TemplateControl.ParseControl Method

Parses an input string into a System.Web.UI.Control object on the ASP.NET Web page or user control.

Syntax

public Control ParseControl (string content, bool ignoreParserFilter)

Parameters

content
A string that contains a user control.
ignoreParserFilter
A value that specifies whether to ignore the parser filter.

Returns

The parsed control.

Remarks

The content parameter contains a user control (the contents of an .ascx file). This string cannot contain any code, because the TemplateControl.ParseControl(string) method never causes compilation.

The ignoreParserFilter parameter allows the System.Web.UI.PageParserFilter class to be ignored. The System.Web.UI.PageParserFilter class is used by the ASP.NET parser to determine whether an item is allowed in the page at parse time.

Requirements

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