KidsLovePC Contact Us
  Home   PHP  Graphics ASP  JavaScript   J2EE  HTML  JAVA   Swing   Webtip  Forums  Lyric  Free sheet music  Ringtones

The QueryString collection

The queryString collection contains any information which is added to the URL after the file name. For instance, given a URL of

http://www.trading.com/login.cgi?firstname=harry&lastname=potter

The QueryString collection would contain two items:
firstname with a value of "harry" and
lastname with a value of "potter"
The "?" is used to signal the beginning of the querystring.

A second way of generating a querystring is by using a Form wi ht a Get method instead of a Post method. For example, using the Form from <<<link>>, but instead of using the post method, we will us the GET method.

<form action="IfThenAction.asp" method="GET">
Please choose your preference in month, either March or April:<br>
<input type="text" Name="monthpref"><p>
Please input your preference in location, either East or West<br>
<input type="text" name="location">
<br>
<input type="submit"><input type="reset">
</form>

If we assume the user enters April for MonthPref and East for location, the URL generated from this will look something like:

http://www.yourwebsite.com/IfThenAction.asp?MonthPref=April&Location=East

Retrieving a QueryString

Retrieve All name/value pairs

<% strList=Request.QuerySTring%>

Retrieve a specific item

<% strList=Request.QueryString("iterm_name")%>


Where item_name is the name set in the requesting form. In the above example, we would retrieve MonthPref and Location as follows:

<% strMonthPref=REquest.QueryString("MonthPref") %>
<% strLocation =Request.QueryString("Location")%>

 

 

 


ASP tutorial
What is ASP
Install IIS
VBScript or JScript
ClientSide vs ServerSide scripting
ASP execution order
Dealing with Form
More Form example
Variable &Variant
String
Local variable
Global variable
Arrays
Use if_then_else
Use Select Case
For_Next loop
Do_while loop
Subroutine vs Function
Request Object
QueryString
Count Keyword
Using QueryString
Application, Method, Events
Create Virtual Directory
Save array in Application
Session, Method, Events
Using Cookie
Server Object
Ad Rotator
Content Linker
Browser
Dictionary object
Filesystemobject Object

 

 

 

 

Best books about ASP & ASP.Net from Amazon
Beginning Dynamic Websites : with ASP.NET Web Matrix (Programmer to Programmer) (Paperback) Build Your Own ASP.NET Website Using C# & VB.NET (Build Your Own) (Paperback) Professional Active Server Pages 3.0 (Programmer to Programmer) (Paperback) ASP.NET Cookbook (Paperback) ASP.NET Kick Start (Paperback)

 

Printer Inkjet A Z lyricsLearn ChineseHome|PHP|Swing|HTML|JavaScript|ASP|JAVA|Forum|WebTip|Contact Us
Copyright © kidslovepc.com All rights reserved(new). Privacy|Copyright
designed by info@kidslovepc.com

Please help us cover the web site maintenance fee.
barcode scanner Thermal Printer credit card machine bar code printer