UriBuilder.Query Property
[ This article is for Windows Phone 8 developers. If you’re developing for Windows 10, see the latest documentation. ]
Gets or sets any query information included in the URI.
Assembly: System (in System.dll)
The Query property contains any query information included in the URI. Query information is separated from the path information by a question mark (?) and continues to the end of the URI. The query information returned includes the leading question mark.
The query information is escaped according to RFC 3986.
Note: |
|---|
|
The following example sets the Query property.
UriBuilder baseUri = new UriBuilder("http://www.contoso.com/default.aspx?Param1=7890"); string queryToAppend = "param2=1234"; if (baseUri.Query != null && baseUri.Query.Length > 1) baseUri.Query = baseUri.Query.Substring(1) + "&" + queryToAppend; else baseUri.Query = queryToAppend;
Note: