asp.net.ph

Request.MapPath Method ( String, String, Boolean )

System.Web Namespace   HttpRequest Class


Maps the specified virtual path to a physical path.

[ VB ]
Overloads Public Function MapPath ( _
   ByVal virtualPath As String, _
   ByVal baseVirtualDir As String, _
   ByVal allowCrossAppMapping As Boolean _
) As String

[ C# ]
public string MapPath (
   string virtualPath,
   string baseVirtualDir,
   bool allowCrossAppMapping
);

[ C++ ]
public: String* MapPath (
   String* virtualPath,
   String* baseVirtualDir,
   bool allowCrossAppMapping
);

[ JScript ]
public function MapPath (
   virtualPath : String,
   baseVirtualDir : String,
   allowCrossAppMapping : Boolean
) : String;

Parameters

virtualPath
The virtual path ( absolute or relative ) for the current request.
baseVirtualDir
The virtual base directory path used for relative resolution.
allowCrossAppMapping
If true, the virtualPath may belong to another application.

Return Value

The physical path on the server.

Exceptions


Exception Type Condition
HttpException Occurs when allowCrossAppMapping is false and virtualPath belongs to another application.

or

Attempted to map the path when there is no HttpContext object defined for the request.

See Also

HttpRequest Class   HttpRequest.MapPath Overload List Skip Navigation Links




Home
Suggested Reading


Previous page Back to top Next page

© 2000-2010 Rey Nuñez All rights reserved.

If you have any question, comment or suggestion
about this site, please send us a note

You can help support asp.net.ph