This documentation is archived and is not being maintained.

Uri.AbsolutePath Property

Gets the absolute path of the URI.

[Visual Basic]
Public ReadOnly Property AbsolutePath As String
public string AbsolutePath {get;}
public: __property String* get_AbsolutePath();
public function get AbsolutePath() : String;

Property Value

A string containing the absolute path to the resource.


The AbsolutePath property contains the path information that the server uses to resolve requests for information. Typically this is the path to the desired information on the server's file system, although it also can indicate the application or script the server must run to provide the information.

The path information does not include the scheme, host name, or query portion of the URI. The AbsolutePath property always returns at least a slash (/).


The following example writes the path/catalog/shownew.htm to the console.

[Visual Basic] 
Dim baseUri As New Uri("")
Dim myUri As New Uri(baseUri, "catalog/shownew.htm?date=today")

Uri baseUri = new Uri("");
 Uri myUri = new Uri(baseUri, "catalog/shownew.htm?date=today");

Uri* baseUri = new Uri(S"");
Uri* myUri = new Uri(baseUri, S"catalog/shownew.htm?date=today");

var baseUri : Uri = new Uri("");
var myUri : Uri = new Uri(baseUri, "catalog/shownew.htm?date=today");


Platforms: Windows 98, Windows NT 4.0, Windows Millennium Edition, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family, .NET Compact Framework, Common Language Infrastructure (CLI) Standard

See Also

Uri Class | Uri Members | System Namespace