System.Web.VirtualPathUtility.IsAbsolute Method

Returns a Boolean value indicating whether the specified virtual path is absolute; that is, it starts with a literal slash mark (/).

Syntax

public static bool IsAbsolute (string virtualPath)

Parameters

virtualPath
The virtual path to check.

Returns

true if virtualPath is an absolute path and is not null or an empty string (""); otherwise, false.

Remarks

A virtual path is absolute if it begins with a literal slash mark (/). For example, the HttpRequest.Path property returns an absolute virtual path.

Requirements

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