HttpRequestBase.MapPath Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
When overridden in a derived class, maps the virtual path in the requested URL to a physical path on the server.
Overloads
MapPath(String) |
When overridden in a derived class, maps the specified virtual path to a physical path on the server. |
MapPath(String, String, Boolean) |
When overridden in a derived class, maps the specified virtual path to a physical path on the server. |
MapPath(String)
When overridden in a derived class, maps the specified virtual path to a physical path on the server.
public:
virtual System::String ^ MapPath(System::String ^ virtualPath);
public virtual string MapPath (string virtualPath);
abstract member MapPath : string -> string
override this.MapPath : string -> string
Public Overridable Function MapPath (virtualPath As String) As String
Parameters
- virtualPath
- String
The virtual path (absolute or relative) to map to a physical path.
Returns
The physical path on the server that is specified by virtualPath
.
Exceptions
Always.
Applies to
MapPath(String, String, Boolean)
When overridden in a derived class, maps the specified virtual path to a physical path on the server.
public:
virtual System::String ^ MapPath(System::String ^ virtualPath, System::String ^ baseVirtualDir, bool allowCrossAppMapping);
public virtual string MapPath (string virtualPath, string baseVirtualDir, bool allowCrossAppMapping);
abstract member MapPath : string * string * bool -> string
override this.MapPath : string * string * bool -> string
Public Overridable Function MapPath (virtualPath As String, baseVirtualDir As String, allowCrossAppMapping As Boolean) As String
Parameters
- virtualPath
- String
The virtual path (absolute or relative) to map to a physical path.
- baseVirtualDir
- String
The virtual base directory path that is used for relative resolution.
- allowCrossAppMapping
- Boolean
true
to indicate that virtualPath
can belong to another application; otherwise, false
.
Returns
The physical path on the server.
Exceptions
Always.
Applies to
Σχόλια
https://aka.ms/ContentUserFeedback.
Σύντομα διαθέσιμα: Καθ' όλη τη διάρκεια του 2024 θα καταργήσουμε σταδιακά τα ζητήματα GitHub ως μηχανισμό ανάδρασης για το περιεχόμενο και θα το αντικαταστήσουμε με ένα νέο σύστημα ανάδρασης. Για περισσότερες πληροφορίες, ανατρέξτε στο θέμα:Υποβολή και προβολή σχολίων για