现在是基本的输入对象Request ub\MlSr
这个对象主要就是服务器获取网页的传入值,例如,注册时输入的用户名,密码,生日之类的 |~vI3]}fx
既然是对象,我们就来说一下他的属性 #nPQ!NB/
Form 获取窗体的内容 PC-"gi=h
QueryString 获取URL参数的内容 I
,z3xU
Cookies 获取客户端的Cookies数据 ne_TIwf w-
Browser 获取浏览器的信息 %~E ?Z!_W
ServerVariables 获取服务器信息 "C{}Z
ClientCertificate 这个是获取客户端用户的认证数据 r'HtZo$^R
这个能记就记,不能记就别记,看一百个程序就能自己记住了 hUp.tK:X7o
? -dX`n
SfaQvstN
Form和QuerString这两个用的最多 to DG7XN}
我给大家举个例子啊 =06gj)8
<html> iA' lon
<head><title><4.11.htm></title></head> 1]@}|
<body> pH"#8O&
<h2>会员登陆网页</h2> HoRg^Ai?\
<form name ="login" action="4.11.aspx" method="post"> zGAq-<
用户名1: #AL=f'2=f
<input type="text" name="Username" size="10"> GycSwQ
,
密码: jw^<IMAG\8
<input type="password" name="pass1" size="10"> uF9C-H@:
用户名2: (s~hh
<input type="text" name="Username" size="10"> Aka`L:k
密码 Wl{Vz
<input type="password" name="pass2" size="10"> f>o@Y]/l
<input type="submit" name="Send" value="会员登陆"> UqH7e c
</form> dbR4%;<
</body> x:(e:I8x(
</html> "D+QT+sD
上面那个是页面设计,下面这个处理页面 'W)x<Iey1
//4.11.Aspx QJ
QQ-
<html> h6#
<head><title>4.11.aspx</title></head> K%;O$
>
<body> W'[!4RQL
<% 7RO=X%0A
const BR="<br>" '这个是换行的 8w$cj'
Dim name1,name2,pass1,pass2 As string DwI)?a_+
Dim EncodingType As string `7NgQ*g.d/
6eb5 q/
encodingType=request.ContenEncoding.EncodingName Jv5G:M5+~
UV=TU=A\o
name1=Request.Form.GetValues("Username")(0) Qx:+n`$/
name2=Request.Form.GetValues("Username")(1)
:geXplTx
pass1=Request.Form("PassWord1") 3' ^ON
pass2=Request("PassWord2") |Q$C%7
McfSB(59
Response.Write("会员1:<b>"&name1&"</b>"&BR) H_x35|"
Response.Write("密码1:<b>"&pass1&"</b>"&BR) lB,MVsn18
Response.Write("会员2:<b>"&name2&"</b>"&BR) "5@Y\L
Response.Write("密码2:<b>"&pass2&"</b>"&BR) KxvT}"k
Response.Write("会员:<b>"&Request.Form("Username")&BR) ,5q^/h
Response.Write("字段数:"&Request.Form.Count &BR) Cnc77EUD
Response.Write("编码:"&EncodingType) bf3)^ 49}
%> VctAQ|h^
</body> %dKUB4
</html> bxK1v7
这个就是最简单一个会员登陆的页面。注册也是这样的,如果在完善一下,加下数据验证的,咱也就是一个专业的网页设计的了 SP97Q-
r8}GiP0|
欢迎大家来一起讨论~~我现在学习到数据库方面的了,写的比较慢,学的快的和我联席讨论呀~~~~