Embed presentation
Download to read offline

![[Serializable]
internal class HttpValueCollection : NameValueCollection
{](https://image.slidesharecdn.com/querystring-httpvaluecollection-131209011406-phpapp02/85/Query-string-httpvaluecollection-2-320.jpg)
![NameValueCollection q = System.Web.HttpUtility.ParseQueryString("test=value1&test=value2");
q.ToString();
// test=value1&test=value2
NameValueCollection q = System.Web.HttpUtility.ParseQueryString("");
q["id"] = "11";
q["name"] = "Jax";
q.ToString();
// id=11&name=Jax](https://image.slidesharecdn.com/querystring-httpvaluecollection-131209011406-phpapp02/85/Query-string-httpvaluecollection-3-320.jpg)
This document discusses how to parse and manipulate query strings in C#. It shows how to use the HttpUtility.ParseQueryString method to parse a query string into a NameValueCollection that can then be accessed and modified like a dictionary. The ToString method on the NameValueCollection returns the query string representation.

![[Serializable]
internal class HttpValueCollection : NameValueCollection
{](https://image.slidesharecdn.com/querystring-httpvaluecollection-131209011406-phpapp02/85/Query-string-httpvaluecollection-2-320.jpg)
![NameValueCollection q = System.Web.HttpUtility.ParseQueryString("test=value1&test=value2");
q.ToString();
// test=value1&test=value2
NameValueCollection q = System.Web.HttpUtility.ParseQueryString("");
q["id"] = "11";
q["name"] = "Jax";
q.ToString();
// id=11&name=Jax](https://image.slidesharecdn.com/querystring-httpvaluecollection-131209011406-phpapp02/85/Query-string-httpvaluecollection-3-320.jpg)