System.Web.UI.Page.MapPath Method

Retrieves the physical path that a virtual path, either absolute or relative, or an application-relative path maps to.

Syntax

public string MapPath (string virtualPath)

Parameters

virtualPath
A string that represents the virtual path.

Returns

The physical path associated with the virtual path or application-relative path.

Remarks

Note:

The Page.MapPath(string) property can potentially contain sensitive information about the hosting environment. The return value should not be displayed to users.

Requirements

Namespace: System.Web.UI
Assembly: System.Web (in System.Web.dll)
Assembly Versions: 1.0.5000.0, 2.0.0.0