Skip to content

VirtualPathUtility.ToAbsolute method (1 of 3)

Converts a path to absolute.

public static string ToAbsolute(HttpContext? context, string contentPath)
parameter description
context The HTTP context.
contentPath The content path.

Return Value

The absolute path.

See Also


VirtualPathUtility.ToAbsolute method (2 of 3)

Converts a path to absolute.

public static string ToAbsolute(IHttpContextAccessor? accessor, string contentPath)
parameter description
accessor The HTTP context accessor.
contentPath The content path.

Return Value

The absolute path.

See Also


VirtualPathUtility.ToAbsolute method (3 of 3)

Converts a path to absolute.

public static string ToAbsolute(PathString pathBase, string path)
parameter description
pathBase The path base.
path The content path.

Return Value

The absolute path.

See Also