VirtualPathUtility.IsAbsolute Method
.NET Framework 3.0
Returns a Boolean value indicating whether the specified virtual path is absolute; that is, it starts with a literal slash mark (/).
Namespace: System.Web
Assembly: System.Web (in system.web.dll)
Assembly: System.Web (in system.web.dll)
public static boolean IsAbsolute ( String virtualPath )
public static function IsAbsolute ( virtualPath : String ) : boolean
Not applicable.
Parameters
- virtualPath
The virtual path to check.
Return Value
true if virtualPath is an absolute path and is not a null reference (Nothing in Visual Basic) or an empty string (""); otherwise, false.A virtual path is absolute if it begins with a literal slash mark (/). For example, the Path property returns an absolute virtual path.
The following code example demonstrates how to use the IsAbsolute, IsAppRelative, and ToAppRelative methods.
Community Additions
ADD
Show: