Below we use a registration form to apply the controls commonly used in the form.
1, the Registration Form page code: (login.htm)
<HTML>
<HEAD><TITLE> Registration Form </TITLE>
<style type= "Text/css" >
<!--
body,td,th {
font-size:11pt;
Color: #009999;
line-height:1.5;
}
Body {
Background-color: #ffffff;
margin-top:0px;
margin-bottom:0px;
}
a:link {
Color: #0000FF;
Text-decoration:none;
}
a:visited {
Text-decoration:none;
Color: #0000FF;
}
a:hover {
Text-decoration:underline;
Color: #FF0000;
}
a:active {
Text-decoration:none;
}
. style2 {color: #0000FF}
. style4 {color: #FF0000}
-->
</style>
<meta http-equiv= "Content-type" content= "text/html; charset=gb2312 "></HEAD>
<body background= "4.jpg" >
<br><br><br><br><br><br>
<form name= "Form1" method= "Post" action= "show.asp" >
<table width= "580" border= "2" align= "center" bgcolor= "#b5b5b4" >
<tr bgcolor= "#000066" height= ">"
<TD colspan= "2" align= "center" ><font color= "#fffff" ><b> please register </b></font></td>
</tr>
<tr height= ">"
<TD align= "Center" > Name:
<input type= "text" name= "name" ></td>
<TD align= "center" > Password:
<input type= "password" name= "password" ></td>
</tr>
<TR height= align= "center" >
<td> male:
<input type= "Radio" name= "Gender" value= "male" checked>
Woman:
<input type= "Radio" name= "Gender" value= "female" ></td>
<td> Education: <select name= "Education" style= "width:156px" >
<option value= "Junior High School" > Junior High School
<option value= "High School" > High School
<option value= "secondary School" > Secondary School
<option value= "College" > College
<option value= "undergraduate" selected> undergraduate
<option value= "Postgraduate" > graduate student
<option value= "PhD" > PhD
</select></td>
</tr>
<TR height= align= "center" >
<TD colspan= "2" >
<input type= "checkbox" name= "hobby" value= "reading" > Reading
<input type= "checkbox" name= "Hobby" value= "outing" > Outing
<input type= "checkbox" name= "Hobby" value= "Dancing" > Dancing
<input type= "checkbox" name= "hobby" value= "singing" > Singing
<input type= "checkbox" name= "hobby" value= "watching news" > Watching news
<input type= "checkbox" name= "hobby" value= "Party" > Party
</td>
</tr>
<tr>
<TD colspan= "2" >
<font color= "Red" ><b> your favorite maxim:</b></font>
<p> <textarea name= "Maxim" rows= "6" cols= "to" > the world to learn, to understand, there are too many things to know , and the person is not versatile, so I am the principle of being a person: never laugh at those who are weaker than themselves in some aspect. </textarea></td>
</tr>
<tr>
<TD colspan= "2" align= "Center" >
<input type= "Submit" Name= "submitted" value= "Submit" >
<input type= "reset" name= "reset" value= "reset" >
</td>
</tr>
</table>
</form>
</body>
</HTML>
2, Information display page (show.asp)
<HTML>
<HEAD><TITLE> Registration Form </TITLE>
<style type= "Text/css" >
<!--
body,td,th {
font-size:11pt;
Color: #009999;
line-height:1.5;
}
Body {
margin-top:0px;
margin-bottom:0px;
}
a:link {
Color: #0000FF;
Text-decoration:none;
}
a:visited {
Text-decoration:none;
Color: #0000FF;
}
a:hover {
Text-decoration:underline;
Color: #FF0000;
}
a:active {
Text-decoration:none;
}
. style2 {color: #0000FF}
. style4 {color: #FF0000}
-->
</style>
<body background= "4.jpg" >
<br><br><br><br><br><br>
<%
Dim name,ps,sex,schoolage,like1,adage
Name=request.form ("name")
Ps=request.form ("password")
Sex=request.form ("Gender")
If sex= "male" then
sex= "Handsome"
Else
Sex= "Bright Sister"
End If
Schoolage=request.form ("Education")
Like1=request.form ("hobby")
Adage=request.form ("Maxim")
%>
<center>
<table border= "2" width= ">"
<tr>
<th colspan= "2" bgcolor= "#009966" ><font color= "#ffffff" > Your information is as follows:</font></th>
</tr>
<TR align= "center" height= "valign=" Middle "bgcolor=" "#FFFFFF" >
<TD aling= "center" >
Welcome to <%=name%><%=sex%> 's visit!<p>
Your hobby is: <%=like1%><p>
Your education is: <%=schoolage%><p>
Your password is: <%=ps%><p>
<table>
<tr><th><font color= "Red" > Your motto is:</font><p></th></tr>
<tr>
<td>
<%=adage%>
</td>
</tr>
</table>
</td>
</tr>
</table>
</center>
</body>
</HTML>
See the full set of ASP Getting started tutorials