Export (0) Print
Expand All
This topic has not yet been rated - Rate this topic

HttpRequest.Path Property

Gets the virtual path of the current request.

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

Property Value

The virtual path of the current request.

Remarks

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.

Example

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

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

[C#] 
String Path;
 Path = Request.Path;
   

[C++] 
String* Path;
 Path = Request->Path;


[JScript] 
var path : String = Request.Path
   

Requirements

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

See Also

HttpRequest Class | HttpRequest Members | System.Web Namespace

Did you find this helpful?
(1500 characters remaining)
Thank you for your feedback
Show:
© 2014 Microsoft. All rights reserved.