Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
Path Property

HttpRequest.Path Property

Gets the virtual path of the current request.

[Visual Basic]
Public ReadOnly Property Path As String
public string Path {get;}
public: __property String* get_Path();
public function get Path() : String;

Property Value

The virtual path of the current request.


The FilePath does not include the PathInfo trailer. For the URL Http://www.contoso.com/virdir/page.html/tail, the FilePath is Http://www.contoso.com/virdir/page.html.


The following example assigns the virtual path for the current request to a string variable.

[Visual Basic] 
Dim Path As String
 Path = Request.Path

String Path;
 Path = Request.Path;

String* Path;
 Path = Request->Path;

var path : String = Request.Path


Platforms: Windows 2000, Windows XP Professional, Windows Server 2003 family

See Also

HttpRequest Class | HttpRequest Members | System.Web Namespace

© 2015 Microsoft