System.Web.HttpUtility.ParseQueryString Method

Parses a query string into a System.Collections.Specialized.NameValueCollection using System.Text.Encoding.UTF8 encoding.

Syntax

public static System.Collections.Specialized.NameValueCollection ParseQueryString (string query)

Parameters

query
The query string to parse.

Returns

A System.Collections.Specialized.NameValueCollection of query parameters and values.

Remarks

The HttpUtility.ParseQueryString(string) method uses System.Text.Encoding.UTF8 format to parse the query string In the returned System.Collections.Specialized.NameValueCollection, URL-encoded characters are decoded and multiple occurrences of the same query string parameter are listed as a single entry with a comma separating each value.

Note:

The HttpUtility.ParseQueryString(string) method uses query strings that might contain user input, which is a potential security threat. By default, ASP.NET Web pages validate that user input does not include script or HTML elements. For more information, see Script Exploits Overview.

Requirements

Namespace: System.Web
Assembly: System.Web (in System.Web.dll)
Assembly Versions: 2.0.0.0