This documentation is archived and is not being maintained.

Uri.PathAndQuery Property

Gets the AbsolutePath and Query properties separated by a question mark (?).

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

Property Value

A string that contains the AbsolutePath and Query properties separated by a question mark (?).


The PathAndQuery property contains the absolute path on the server and the query information sent with the request. It is identical to concatenating the AbsolutePath and Query properties.

The PathAndQuery property is escaped according to RFC 2396.


The following example writes the URI's path (/catalog/shownew.htm) and query (date= today) information 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