Complete Request Object Reference
The QueryString collection is used to retrieve the variable values in the HTTP query string.
The HTTP query string is specified by the values following the question mark (?), like this:
<a href= "test.asp?txt=this is a query string test">Link with a query string</a>
The line above generates a variable named txt with the value "this is a query string test".
Query strings are also generated by form submission, or by a user typing a query into the address bar of the browser.
Note: If you want to send large amounts of data (beyond 100 kb) the Request.QueryString cannot be used.
| Parameter | Description |
|---|---|
| variable | Required. The name of the variable in the HTTP query string to retrieve |
| index | Optional. Specifies one of multiple values for a variable. From 1 to Request.QueryString(variable).Count |
To loop through all the n variable values in a Query String:
The following request is sent:
and names.asp contains the following script:
The file names.asp would display the following:
The following string might be sent:
this results in the following QUERY_STRING value:
Now we can use the information in a script:
Output:
If you do not specify any variable values to display, like this:
the output would look like this:
Complete Request Object Reference
| WEB HOSTING |
|---|
| Best Web Hosting |
| PHP MySQL Hosting |
| Best Hosting Coupons |
| UK Reseller Hosting |
| Cloud Hosting |
| Top Web Hosting |
| $7.95/mo SEO Hosting |
| Premium Website Design |
| WEB BUILDING |
|---|
| Download XML Editor |
| FREE Website BUILDER |
| Free Website Templates Free CSS Templates |
| Make Your Own Website |
| W3SCHOOLS EXAMS |
|---|
|
Get Certified in: HTML, CSS, JavaScript, XML, PHP, and ASP |
| W3SCHOOLS BOOKS |
|---|
|
New Books: HTML, CSS JavaScript, and Ajax |
| STATISTICS |
|---|
|
Browser Statistics Browser OS Browser Display |
| SHARE THIS PAGE |
|---|