System.Web.VirtualPathUtility.ToAppRelative Method

Converts a virtual path to an application-relative path using a specified application path.

Syntax

public static string ToAppRelative (string virtualPath, string applicationPath)

Parameters

virtualPath
The virtual path to convert to an application-relative path.
applicationPath
The application path to use to convert virtualPath to a relative path.

Returns

The application-relative path representation of virtualPath.

Remarks

The VirtualPathUtility.ToAppRelative(string, string) overload of the erload:System.Web.VirtualPathUtility.ToAppRelative method uses applicationPath rather than the current application path. If virtualPath does not start with applicationPath, the VirtualPathUtility.ToAppRelative(string, string) method returns the virtual path unchanged.

Requirements

Namespace: System.Web
Assembly: System.Web (in System.Web.dll)
Assembly Versions: 2.0.0.0
Since: .NET 2.0