The MapPath method maps the specified relative or virtual path to the corresponding physical directory on the server.

Namespace: DotNetNuke.Common.Utilities
Assembly: DotNetNuke (in DotNetNuke.dll)

Syntax

C#
[EditorBrowsableAttribute(EditorBrowsableState.Never)]
[ObsoleteAttribute("Deprecated in DNN 6.0.  It has been replaced by PathUtils.Instance.MapPath(string path) ")]
public static string MapPath(
	string path
)
Visual Basic
<EditorBrowsableAttribute(EditorBrowsableState.Never)> 
<ObsoleteAttribute("Deprecated in DNN 6.0.  It has been replaced by PathUtils.Instance.MapPath(string path) ")> 
Public Shared Function MapPath ( 
	path As String
) As String

Parameters

path
Type: System..::..String
Specifies the relative or virtual path to map to a physical directory. If Path starts with either a forward (/) or backward slash (\), the MapPath method returns a path as if Path were a full, virtual path. If Path doesn't start with a slash, the MapPath method returns a path relative to the directory of the .asp file being processed

Return Value

returnsM:DotNetNuke.Common.Utilities.FileSystemUtils.MapPath(System.String)

Remarks

If path is a null reference (Nothing in Visual Basic), then the MapPath method returns the full physical path of the directory that contains the current application

See Also