Export (0) Print
Expand All

TemplateControl.ParseControl Method (String, Boolean)

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

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

public Control ParseControl(
	string content,
	bool ignoreParserFilter
)

Parameters

content
Type: System.String

A string that contains a user control.

ignoreParserFilter
Type: System.Boolean

A value that specifies whether to ignore the parser filter.

Return Value

Type: System.Web.UI.Control
The parsed control.

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

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

.NET Framework

Supported in: 4.5, 4, 3.5 SP1, 3.0 SP1, 2.0 SP1

Windows 8.1, Windows Server 2012 R2, Windows 8, Windows Server 2012, Windows 7, Windows Vista SP2, Windows Server 2008 (Server Core Role not supported), Windows Server 2008 R2 (Server Core Role supported with SP1 or later; Itanium not supported)

The .NET Framework does not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.

Show:
© 2014 Microsoft