Search Search

#1 worldwide
FREE Coding Lessons

since 1996
   THE BEST WAY to learn ASP & Asp.net!
Advertise Here!
click for details
Credits Host:
DiscountASP.net
Server Admin:
The "Team"
Contact Info.
Charles M. Carroll

my Blog
[prev. Lesson]  Forms: Introduction
     [next Lesson]  Forms: Text Area

Forms - Text Box   (by John Kauffman & Charles Carroll)

<INPUT NAME="NameLast"> This will create an input box of a default size and the browser will pass the user input to ASP with the label (identifier) of NameLast.
<INPUT NAME="ZipCode" SIZE="10"> This is not a limit to the number of characters that can be entered. Do not use size as a validation technique to limit verbose users.
<INPUT NAME="State" MaxLength="2"> This controls the maximum number of characters that can be entered.
<INPUT NAME="NameLast" VALUE="Bertrand"> The name of Bertrand will appear when the page is opened and will re-appear if the form is reset.

   filename=/learn/test/formtextbox.asp

<Test Script Below>


<html><head>
<title>FormTextBox.asp</title>
</head><body bgcolor="#FFFFFF">
<Form action = "FormTextBoxRespond.asp" method="get">
Fill Out This Form For Us:<p>
Last Name -> <Input NAME="NameLast" size ="10"><br>
Country -> <Input NAME="Country" value="USA" size="10"><br>
State -> <Input NAME="State" MaxLength="2" size="2"><br>
<Input type="submit" value="Give me your data!">
<hr></form>
</body></html>

   filename=/learn/test/formtextboxrespond.asp

<Test Script Below>


<html><head>
<title>FormTextBoxRespond.asp</title>
</head><body bgcolor="#FFFFFF">
<%
lname=request.querystring("namelast")
cty=request.querystring("country")
st=request.querystring("state")

response.write lname & "<br>"
response.write cty & "<br>"
response.write st & "<br>"%>
</body></html>

Send Us a Holiday Gift!. Charles celebrates Christmas, Jewish holidays, Kwanza, Chinese New Year, Japanese Holidays, Secretary Day, High Muslim Holy Days, Pagan & Wicca holidays, and many more! - send a gift any HOLIDAY. 2004 gift gallery & 2005 gift gallery