Parses a query string into a System.Collections.Specialized.NameValueCollection using the specified System.Text.Encoding.
- query
- The query string to parse.
- encoding
- The System.Text.Encoding to use.
A System.Collections.Specialized.NameValueCollection of query parameters and values.
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.
The HttpUtility.ParseQueryString(string, System.Text.Encoding) 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.