In this article i will describe What is Query String and how to use it?
A query string is information that is appended to the end of a pafe URL. A typical query string might look like the following example :
In this URL path, the query string starts with the question mark (?) and includes two attribute-value pairs, oe called category and other called price.
Query String provide a simple but limited way of maintaing state information. For example, they are an easy way to pass information from one page to another, such as passing a product number from one page to another page where it will be processed. However, some browsers and client devices impose a 255-character limit on the length of the URL.
In the Previous articles i explained how to retrieve value from query string using C# and ASP.Net, what is namespace for arraylist, Get Selected RadioButton Value of RadioButtonList using C# and ASP.Net, how to create serial no. column in gridview using asp.net, Add check boxes column in DataGridView for deleting records from database and many more about ASP.Net.
Send Value From One page to another using URL like Following :
Now the Next step is get the value from Query String.
Suppose you want to get value from query string "price".
You can use Below Code :
Above Code give you the result "500". Because Query String "Price" has value "500".