Information
The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.
0 out of 1 rated this helpful - Rate this topic

HttpRequest.FilePath Property

Gets the virtual path of the current request.

[Visual Basic]
Public ReadOnly Property FilePath As String
[C#]
public string FilePath {get;}
[C++]
public: __property String* get_FilePath();
[JScript]
public function get FilePath() : 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 server's virtual directory path for the current request to a string variable.

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

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

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

[JScript] 
var path : String = Request.FilePath
    

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.