Url DirectoryPath Property C# API
Gets the directory components of the path in this Url, excluding the filename.

Namespace: Facilita.Web
Assembly: clrWebBrowser (in clrWebBrowser.dll) Version: 9.5.8.37 (1.0.0.0)
Syntax

public string DirectoryPath { get; }

Field Value

The directory components of the path in this Url, excluding the filename, or an empty string if this Url has no path component.
Examples

The following example demonstrates getting the directory path of different Url objects.
new Url("http://www.myCompany.co.uk/").DirectoryPath;  // returns "/" 
new Url("http://www.myCompany.co.uk/directory/index.php").DirectoryPath;  // returns "/directory" 
new Url("http://www.myCompany.co.uk/directory/subdirectory/").DirectoryPath;  // returns "/directory/subdirectory"
See Also