Professional Documents
Culture Documents
REQUEST OBJECT
The following HTML file creates a form (FORM2.HTML) that is used to collect various data.
The form shows how to use different input data types such as text box, option button, check box,
text area, and list.
<html>
<body>
<!-- Data collected in this form is processed by the ASP script called collectinfo.asp -->
<FORM METHOD = POST ACTION = "collectinfo.asp">
Last Name: <INPUT TYPE = TEXT NAME = LName> <BR>
First Name: <INPUT TYPE = TEXT NAME = FName> <BR>
Middle Name: <INPUT TYPE = TEXT NAME = MName> <BR>
<P>
<!-- Radio button used here - this segment shows how to create option buttons -->
Gender: <BR>
<INPUT TYPE = RADIO NAME = Gender VALUE = Male> Male
<BR>
<INPUT TYPE = RADIO NAME = Gender VALUE = Female> Female
<P>
<!-- Check box used here - this segment shows how to create check boxes-->
Languages Known: <BR>
<INPUT TYPE = CHECKBOX NAME = Languages VALUE = English> English
<INPUT TYPE = CHECKBOX NAME = Languages VALUE = Hindi> Hindi
<INPUT TYPE = CHECKBOX NAME = Languages VALUE = Marathi> Marathi
<INPUT TYPE = CHECKBOX NAME = Languages VALUE = Gujarati> Gujarati
<P>
<!-- List used here - this segment shows how to create lists-->
City: <BR>
<SELECT NAME = "CITY">
<OPTION Value = "Mumbai">Mumbai
<OPTION Value = "Delhi">Delhi
<OPTION Value = "Bangalore">Bangalore
<OPTION Value = "Chennai">Chennai
</SELECT>
<P>
<!-- Text Box used here - this segment shows how to create text area -->
Your Comments: <BR>
<TEXTAREA NAME = "message" ROWS = "5" COLS = "60"></TEXTAREA>
<P>
<!—Now create the submit and clear buttons -->
<INPUT TYPE = SUBMIT VALUE = "Submit Form">
<INPUT TYPE="reset" VALUE="Clear Form">
</FORM>
</body> </html>
Generated by Foxit PDF Creator © Foxit Software
http://www.foxitsoftware.com For evaluation only.
'Now we split the string containing all languages and store each languagae in an array
arrLangs = split(strLanguages, ",")
Dim i
Page 2 of 3
Generated by Foxit PDF Creator © Foxit Software
http://www.foxitsoftware.com For evaluation only.
In the above code we see a property of the Request object called “TotalBytes”. This contains the
total number of bytes the client sent in the body of the HTTP request.
HTTP headers are sent along with a request for a Web page. Every time an ASP page is executed
by the server, the Web server creates a set of server variables that are sent along with the page.
The following ASP script shows how these server variables can be accessed:
<html>
<body>
<%
For Each key in Request.ServerVariables
Response.Write Key & " " & Request.ServerVariables(key)
Response.Write "<BR>"
Response.Write "<BR>"
Next
%>
</body>
</html>
Page 3 of 3