This documentation is archived and is not being maintained.

TemplateParser.ParseFile Method

This method supports the .NET Framework infrastructure and is not intended to be used directly from your code.
Parses the content of the file that is specified by either its virtual or physical path.

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

protected void ParseFile (
	string physicalPath,
	string virtualPath
protected void ParseFile (
	String physicalPath, 
	String virtualPath
protected function ParseFile (
	physicalPath : String, 
	virtualPath : String
Not applicable.



The physical path of the file to parse. physicalPath has precedence over virtualPath.


The virtual path of the file to parse.

Exception typeCondition


physicalPath or virtualPath refers to the file currently being parsed.

If a physical path is specified, it is used over the virtual path for locating the file to parse.

If the path to the file to parse is a circular reference; that is, it refers to the same file that the parser is currently parsing, an HttpException exception is thrown.

Windows 98, Windows Server 2000 SP4, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition

The Microsoft .NET Framework 3.0 is supported on Windows Vista, Microsoft Windows XP SP2, and Windows Server 2003 SP1.

.NET Framework

Supported in: 3.0, 2.0