QueryString Property

WebClient.QueryString Property

 

Gets or sets a collection of query name/value pairs associated with the request.

Namespace:   System.Net
Assembly:  System (in System.dll)

member QueryString : NameValueCollection with get, set

Property Value

Type: System.Collections.Specialized.NameValueCollection

A NameValueCollection that contains query name/value pairs associated with the request. If no pairs are associated with the request, the value is an empty NameValueCollection.

The QueryString property contains a NameValueCollection instance containing name/value pairs that are appended to the URI as a query string. The contents of the QueryString property are preceded by a question mark (?), and name/value pairs are separated from one another by an ampersand (&).

The following code example takes user input from the command line and builds a NameValueCollection that is assigned to the QueryString property. It then downloads the response from the server to a local file.

No code example is currently available or this language may not be supported.

.NET Framework
Available since 1.1
Return to top
Show:
© 2016 Microsoft