System.Web.UI.Control.MapPathSecure Method

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

Syntax

protected string MapPathSecure (string virtualPath)

Parameters

virtualPath
A relative or root relative URL.

Returns

The physical path to the requested file.

Remarks

This method can only be used by server controls that have permissions to read files and which are part of fully trusted .dll files, such as System.Web.dll. This helps prevent security breaches.

Requirements

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