HostingEnvironment.MapPath Method (String)

 
System_CAPS_noteNote

The .NET API Reference documentation has a new home. Visit the .NET API Browser on docs.microsoft.com to see the new experience.

Maps a virtual path to a physical path on the server.

Namespace:   System.Web.Hosting
Assembly:  System.Web (in System.Web.dll)

public static string MapPath(
	string virtualPath
)

Parameters

virtualPath
Type: System.String

The virtual path (absolute or relative).

Return Value

Type: System.String

The physical path on the server specified by virtualPath.

.NET Framework
Available since 2.0
Return to top
Show: