现在是基本的输入对象Request OcF_x/#
这个对象主要就是服务器获取网页的传入值,例如,注册时输入的用户名,密码,生日之类的 W!ug^2"
既然是对象,我们就来说一下他的属性 4IZAJqw(*
Form 获取窗体的内容 _s#J\!F
QueryString 获取URL参数的内容 @dK_w'W
Cookies 获取客户端的Cookies数据 lW-G]V
Browser 获取浏览器的信息 A
,0}bFK
ServerVariables 获取服务器信息 'g<{l&u
ClientCertificate 这个是获取客户端用户的认证数据 [r7Hcb
这个能记就记,不能记就别记,看一百个程序就能自己记住了 n,2 p)#?
.sit5BX
nl2Lqu1
Form和QuerString这两个用的最多 +~F>:v?Rh
我给大家举个例子啊 #"A`:bjG
<html> ?@x$ h
<head><title><4.11.htm></title></head> .mrv"k\<
<body> ,O.iOT0=;
<h2>会员登陆网页</h2> > Q=e9L=
<form name ="login" action="4.11.aspx" method="post"> n>JJ Xw,,
用户名1: hH>a{7V
<input type="text" name="Username" size="10"> kygj" @EX
密码: T@vE@D
<input type="password" name="pass1" size="10"> am5;B`}q
用户名2: 0K"+u9D^
<input type="text" name="Username" size="10"> i885T'
密码 &0*l:uw
<input type="password" name="pass2" size="10"> ^0_ >
<input type="submit" name="Send" value="会员登陆"> p\~ a=
</form> A#q.)8
</body> lu>G=uCJ
</html> s +S6'g--
上面那个是页面设计,下面这个处理页面 W)Y-^i5
//4.11.Aspx of7'?]w
<html> &Pv$nMB$I
<head><title>4.11.aspx</title></head> |a[ "
^
2
<body> A-vYy1,'
<% a>#$&&oQ0
const BR="<br>" '这个是换行的 aTHf+;
Dim name1,name2,pass1,pass2 As string W1o6Sh8v(
Dim EncodingType As string 3k6Dbz
ZiKO|U@/
encodingType=request.ContenEncoding.EncodingName L1lDDS#
E}w5.1
name1=Request.Form.GetValues("Username")(0) %eHr^j~w$
name2=Request.Form.GetValues("Username")(1) LmsPS.It
pass1=Request.Form("PassWord1") Qj
[p/H$
pass2=Request("PassWord2") DfkGNBY
yp]vDm
Response.Write("会员1:<b>"&name1&"</b>"&BR) :L:] 3L
Response.Write("密码1:<b>"&pass1&"</b>"&BR) jbg9EtQ!*
Response.Write("会员2:<b>"&name2&"</b>"&BR) 6U|"d[
Response.Write("密码2:<b>"&pass2&"</b>"&BR) @ajdO/?(Y
Response.Write("会员:<b>"&Request.Form("Username")&BR) o|84yT!~
Response.Write("字段数:"&Request.Form.Count &BR) A0.xPru1p
Response.Write("编码:"&EncodingType) RigS1A\2l
%> h+q#|N
</body> v8uUv%Hkd
</html> ]*$o qn=m
这个就是最简单一个会员登陆的页面。注册也是这样的,如果在完善一下,加下数据验证的,咱也就是一个专业的网页设计的了 &% (1?\~u
WzdlrkD
欢迎大家来一起讨论~~我现在学习到数据库方面的了,写的比较慢,学的快的和我联席讨论呀~~~~