Name

FilePath

Synopsis

stringvar = Request.FilePath

Returns a String containing the virtual path of the current client request. The virtual path includes the name of the application root folder, any subfolders in the request path, and the requested filename.

Parameters

stringvar

A String variable to receive the file path.

Example

The example displays the FilePath property to the user.

Sub Page_Load(  )
   Dim fp As String
   fp = Request.FilePath
   Message.Text = "The virtual path of the current request is: _
           & "<strong>" & fp & "</strong>"
End Sub

Notes

This property is identical to the Path property listed later in this chapter.

Get ASP.NET in a Nutshell now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.