Sitecore 5.0 API

MainUtil.UnmapPath Method 

Maps a physical path to a virtual path.

[Visual Basic]
Public Shared Function UnmapPath( _
   ByVal path As String _
) As String
[C#]
public static string UnmapPath(
   string path
);

Parameters

path
A path.

Return Value

A virtual path.

Remarks

If the path cannot be made into a virtual path, the physical path is returned.

Example

  string path = MainUtil.UnmapPath(@"c:\inetpub\wwwroot\default side\sitecore\images\blank.gif");
  // "/sitecore/images/blank.gif"

See Also

MainUtil Class | Sitecore Namespace | MapPath