RewritePath Method (String, String, String, Boolean)
Collapse the table of content
Expand the table of content

HttpContext.RewritePath Method (String, String, String, Boolean)

Note: This method is new in the .NET Framework version 2.0.

Assigns an internal rewrite path with additional path and query string information.

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

public void RewritePath (
	string filePath,
	string pathInfo,
	string queryString,
	bool setClientFilePath
)
public void RewritePath (
	String filePath, 
	String pathInfo, 
	String queryString, 
	boolean setClientFilePath
)
public function RewritePath (
	filePath : String, 
	pathInfo : String, 
	queryString : String, 
	setClientFilePath : boolean
)

Parameters

filePath

The internal rewrite path.

pathInfo

Additional path information for a resource.

queryString

The request query string.

setClientFilePath

true to set the client file path to the value of the filePath parameter; otherwise false.

Exception typeCondition

ArgumentNullException

path is not within the current application's root directory.

HttpException

filePath is not within the current application's root directory.

The filePath parameter does not include the pathInfo parameter content. For the URL http://www.microsoft.com/virdir/page.html/tail, the filePath parameter is http://www.microsoft.com/virdir/page.html, and the pathInfo parameter is tail.

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

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

.NET Framework

Supported in: 2.0

Community Additions

ADD
Show:
© 2016 Microsoft