现在是基本的输入对象Request %Xh}{ o$G
这个对象主要就是服务器获取网页的传入值,例如,注册时输入的用户名,密码,生日之类的 {4S UGo>
既然是对象,我们就来说一下他的属性 ~uhW~bT
Form 获取窗体的内容 e* [wF}))
QueryString 获取URL参数的内容 Y#os6|MV#
Cookies 获取客户端的Cookies数据 ~:Rbd9IB
Browser 获取浏览器的信息 0z/*JVka
ServerVariables 获取服务器信息 _}5vO$kdO
ClientCertificate 这个是获取客户端用户的认证数据 $9YQ aN%
这个能记就记,不能记就别记,看一百个程序就能自己记住了 S/E&&{`ls
"WKOlfPa
4v_Ac;2m&
Form和QuerString这两个用的最多 wa[L[mw
我给大家举个例子啊 s~7a-J
<html> DXf
<head><title><4.11.htm></title></head> "1,*6(;:
<body> @\?HlGWEf
<h2>会员登陆网页</h2> m.+h@
<form name ="login" action="4.11.aspx" method="post"> {8.Zb NEJ
用户名1: >J;TtNE:
<input type="text" name="Username" size="10"> z@`o(gh
密码: We y*\@
<input type="password" name="pass1" size="10"> RsDSsux
用户名2: nVs@DH
<input type="text" name="Username" size="10"> ~|"Vl<9
密码 Q^ W,)%
<input type="password" name="pass2" size="10"> %V=%ARP|
<input type="submit" name="Send" value="会员登陆"> BvP\c_
</form> <6(0ZO%,C!
</body> 0BXr[%{`
</html> q|ce7HnK
上面那个是页面设计,下面这个处理页面 atZe`0
//4.11.Aspx >*EZZ\eU!
<html> $q\"d?n
<head><title>4.11.aspx</title></head> kEh\@x[
<body> 4ior
<% ovp/DM
const BR="<br>" '这个是换行的 M+:5gMB'
Dim name1,name2,pass1,pass2 As string ddgDq0N1j
Dim EncodingType As string }F]Z1('
at?I @By
encodingType=request.ContenEncoding.EncodingName r:sa|+
HVa D
name1=Request.Form.GetValues("Username")(0) IT NFmD
name2=Request.Form.GetValues("Username")(1) /Qst :q
pass1=Request.Form("PassWord1") xuUEJ
a&
pass2=Request("PassWord2") pEwo}NS*H
Bv7FZK3
Response.Write("会员1:<b>"&name1&"</b>"&BR) }-tJ .3Zw
Response.Write("密码1:<b>"&pass1&"</b>"&BR) vN(~}gOd\
Response.Write("会员2:<b>"&name2&"</b>"&BR) frcX'M}%
Response.Write("密码2:<b>"&pass2&"</b>"&BR) *Hx*s_F
Response.Write("会员:<b>"&Request.Form("Username")&BR) FF#Aq
Response.Write("字段数:"&Request.Form.Count &BR) IFBt#]l0
Response.Write("编码:"&EncodingType) (wL$h5SG
%> +=/j+S`
</body> wnC-~&+6
</html> d*tWFr|J-
这个就是最简单一个会员登陆的页面。注册也是这样的,如果在完善一下,加下数据验证的,咱也就是一个专业的网页设计的了 t0f7dU3e;L
n1;a~0P
欢迎大家来一起讨论~~我现在学习到数据库方面的了,写的比较慢,学的快的和我联席讨论呀~~~~