The most basic form of interactivity on the Web has been, and probably will continue to be for some time to come, the HTML form. It is important to note that ASP does not replace forms, but rather enhances them, and makes them easier for you to implement and manage.
The HTML <FORM> tag specifies what method the form will use to convey information to the processing script. The GET method attribute indicates that forms are used to pass parameters to the processing script or program by appending the parameters to the URL. The processing script or program can then parse out the individual values appended to the URL request, do whatever task is required, and return output to the client browser.
This example demonstrates how to implement a simple form using the HTML GET method attribute, as well as one key benefit of creating forms with ASP: the ability to combine the form and the actual processing code into the same file. The sample creates a small form is that contains two text input boxes, one for the user's first name (fname) and one for his or her last name (lname). The Request.QueryString collection is accessed to obtain the value of the fname and lname variables from the request, and the results are displayed at the bottom of the page.
The first time you run this script, no text will be displayed below the horizontal line. This is because the script executes without any query string, and ASP ignores accesses to Request.QueryString for query string elements that do not exist. However, if you press the Submit button, the page is reloaded, this time with a query string that passes the information that you entered into the text boxes. The second time around, the script displays your name.
The VBScript and JScript versions of this script are available in the IIS samples directory, at ...\asp\interaction\QueryString_VBScript.asp and ...\asp\interaction\QueryString_JScript.asp.