Url WithQuery Method (String)C# API
Initialises a new instance of the Url class using the attributes of this Url, but with the specified queryText string (replacing the existing query data if present).

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

public Url WithQuery(
	string queryText
)

Parameters

queryText
Type: System String
A percent-encoded string of key/value pairs to be appended to the URL, separated by the & character.

Return Value

A new Url object which is the same as this Url but with the specified query data.
Examples

The following example demonstrates adding query data to an existing Url.
IpEndPoint myServer = new IpEndPoint("www.myCompany.co.uk", 8080);
Url url = new Url(Protocol.HTTP, myServer, "index.php");

Url url2 = url.WithQuery("sessionID=12345");
// This refers to http://www.myCompany.co.uk:8080/index.php?sessionID=12345
See Also