现在是基本的输入对象Request P!/8
这个对象主要就是服务器获取网页的传入值,例如,注册时输入的用户名,密码,生日之类的 z&8#1'
既然是对象,我们就来说一下他的属性 pWqahrWh
Form 获取窗体的内容 9UZX+@[F
QueryString 获取URL参数的内容 K;~dZ
Cookies 获取客户端的Cookies数据 4{_5z7ody
Browser 获取浏览器的信息 IM+PjYJ
ServerVariables 获取服务器信息 n9%rjS$
ClientCertificate 这个是获取客户端用户的认证数据 iDA`pemmi&
这个能记就记,不能记就别记,看一百个程序就能自己记住了 R?(j#bk
`^/Q"zH
NNT9\JRv_
Form和QuerString这两个用的最多 !PgYn
我给大家举个例子啊 1/ HofiIa
<html> :MpCj<<[
<head><title><4.11.htm></title></head> _Cxs"to
<body> Ez)Go6Q
<h2>会员登陆网页</h2> B0:O]Ax6.^
<form name ="login" action="4.11.aspx" method="post"> JGtdbD?Fw
用户名1: c~V\,lcI
<input type="text" name="Username" size="10"> ci!c7 ,'c
密码: q#Bdq8
<input type="password" name="pass1" size="10"> ?^hC|IR$
用户名2: bvoR?D\-"
<input type="text" name="Username" size="10"> 8WvT0q>]
密码 w/UsEIr
<input type="password" name="pass2" size="10"> ]k hY8it
<input type="submit" name="Send" value="会员登陆"> 5b&'gd^d
</form> cj[y]2{1h
</body> S&a44i
</html> @c/~qP4
上面那个是页面设计,下面这个处理页面 pCq{F*;
//4.11.Aspx )XD_Yq@E
<html> )Z62xK2
<head><title>4.11.aspx</title></head> 9]Y@eRI<
<body> UZyo:*yB
<% *aSFJK
const BR="<br>" '这个是换行的 *ce h
]v
Dim name1,name2,pass1,pass2 As string fE(rDQI
Dim EncodingType As string ,QK>e;:Be
q|~9%Pujg
encodingType=request.ContenEncoding.EncodingName EprgLZ1B
$+tkBM
name1=Request.Form.GetValues("Username")(0) rIXAn4,dTv
name2=Request.Form.GetValues("Username")(1) @=$;^}JS|
pass1=Request.Form("PassWord1") VL\6U05Z
pass2=Request("PassWord2") |2mEowAd
BM3nZ<%3
Response.Write("会员1:<b>"&name1&"</b>"&BR) !Ed';yfz\(
Response.Write("密码1:<b>"&pass1&"</b>"&BR) k]v a
Response.Write("会员2:<b>"&name2&"</b>"&BR) hgm`6TQ
Response.Write("密码2:<b>"&pass2&"</b>"&BR) C&Rv)j
Response.Write("会员:<b>"&Request.Form("Username")&BR) qp7>_B
Response.Write("字段数:"&Request.Form.Count &BR) NJ|8##Z>
Response.Write("编码:"&EncodingType) GSk;~^l
%> -G{}8GM
</body> #{0c01JZ
</html> RJ0w3T]7
这个就是最简单一个会员登陆的页面。注册也是这样的,如果在完善一下,加下数据验证的,咱也就是一个专业的网页设计的了 ,ujoGSx}
(mv8_~F0
欢迎大家来一起讨论~~我现在学习到数据库方面的了,写的比较慢,学的快的和我联席讨论呀~~~~