现在是基本的输入对象Request NiU2@zgl
这个对象主要就是服务器获取网页的传入值,例如,注册时输入的用户名,密码,生日之类的 2vAQ
既然是对象,我们就来说一下他的属性 ha(Z<
Form 获取窗体的内容 .y@oz7T5
QueryString 获取URL参数的内容 wPwXM!
Cookies 获取客户端的Cookies数据 fjs
[f'L
Browser 获取浏览器的信息 >g+?Oebgw
ServerVariables 获取服务器信息 Y#u}tE
d
ClientCertificate 这个是获取客户端用户的认证数据 %<an9WMF
这个能记就记,不能记就别记,看一百个程序就能自己记住了 *Df,Ijh $
\E%'Y
E
,|xJjh
Form和QuerString这两个用的最多 >(?9?
我给大家举个例子啊 ?<(m
5Al7
<html> w8Sp<6*
<head><title><4.11.htm></title></head> 6P5Ih
<body> ?34 e-
<h2>会员登陆网页</h2> iVy7elT;R
<form name ="login" action="4.11.aspx" method="post"> V`bi&1?6\
用户名1: &!/}Qp
<input type="text" name="Username" size="10"> ^(|vsFzn
密码: `"&da#N]
<input type="password" name="pass1" size="10"> h $L/<3oP6
用户名2: ;uwRyd
<input type="text" name="Username" size="10"> ]cGA~d
密码 A7%:05
<input type="password" name="pass2" size="10"> t4-pM1]1_
<input type="submit" name="Send" value="会员登陆"> rmE" rf
</form> W!6qqi{
</body> 11<KpxKpk
</html> \Dd-Xn_b
上面那个是页面设计,下面这个处理页面 DsT>3
//4.11.Aspx {a4z2"\A
<html> }RwSp!}C
<head><title>4.11.aspx</title></head> b#K:_ac5
<body> AO=h
23ZI
<% ~wJFa'2
const BR="<br>" '这个是换行的 $D}{]MN.
Dim name1,name2,pass1,pass2 As string bZ|FnY}FB
Dim EncodingType As string
jz5qQt]^
:1iqT)&|8F
encodingType=request.ContenEncoding.EncodingName Ee3hG2d`
JvT"bZk(o
name1=Request.Form.GetValues("Username")(0) Kwg4sr5"D
name2=Request.Form.GetValues("Username")(1) Qt/8r*Oe
pass1=Request.Form("PassWord1") <K8\n^i~c
pass2=Request("PassWord2") ^Nmg07_R
{6~l$
Response.Write("会员1:<b>"&name1&"</b>"&BR) p~9vP)74u
Response.Write("密码1:<b>"&pass1&"</b>"&BR) 6Qx#%,U^ J
Response.Write("会员2:<b>"&name2&"</b>"&BR) \o/n
Response.Write("密码2:<b>"&pass2&"</b>"&BR) av$/Om:
Response.Write("会员:<b>"&Request.Form("Username")&BR) ui@2s;1t
Response.Write("字段数:"&Request.Form.Count &BR) FxVZ[R
Response.Write("编码:"&EncodingType) t| 'N+-T3
%> U)o$WH.b
</body> T+<A`k: -
</html> &d5ia+#
这个就是最简单一个会员登陆的页面。注册也是这样的,如果在完善一下,加下数据验证的,咱也就是一个专业的网页设计的了 cdG|m[
iTV) NsC}
欢迎大家来一起讨论~~我现在学习到数据库方面的了,写的比较慢,学的快的和我联席讨论呀~~~~