现在是基本的输入对象Request ,mL
!(US
这个对象主要就是服务器获取网页的传入值,例如,注册时输入的用户名,密码,生日之类的 c$QX)V
既然是对象,我们就来说一下他的属性 ]}6w#)]"
Form 获取窗体的内容 08m;{+|vY
QueryString 获取URL参数的内容 C}*cx$.
Cookies 获取客户端的Cookies数据 ^Mk%z9
?
Browser 获取浏览器的信息 cbu@*NzY,
ServerVariables 获取服务器信息 *VkgQ`c
ClientCertificate 这个是获取客户端用户的认证数据 ' 2-oh
这个能记就记,不能记就别记,看一百个程序就能自己记住了 OcSEo7W
Q!FLR>8
*I?Eb-!t
Form和QuerString这两个用的最多 ?<yM7O,4
我给大家举个例子啊 _ZAch zV
<html> ;|cTHGxbE
<head><title><4.11.htm></title></head> rBN)a"
<body> G^1b>K
<h2>会员登陆网页</h2> "uPy,<l
<form name ="login" action="4.11.aspx" method="post">
`:G%
用户名1: tB'V
<input type="text" name="Username" size="10"> [!VOw@uz
密码: U#o'H @
<input type="password" name="pass1" size="10"> STA4 p6
用户名2: ='E$-_
<input type="text" name="Username" size="10"> oQj=;[
密码 Ij'NC C
<input type="password" name="pass2" size="10"> 47T}0q,
<input type="submit" name="Send" value="会员登陆"> ^-M^gYBR
</form> ._96*r=o
</body> a/uo}[Y
</html> ag4`n:1
上面那个是页面设计,下面这个处理页面 "XLe3n
//4.11.Aspx ]fI/(e_U
<html> 4E:bp
<head><title>4.11.aspx</title></head> W];EKj,3W
<body> &wetzC)
<% BD#.-xWV
const BR="<br>" '这个是换行的 e|r0zw S
Dim name1,name2,pass1,pass2 As string ARfRsPxr
Dim EncodingType As string k 2%S`/:
G 8Y+w
encodingType=request.ContenEncoding.EncodingName cxYfZ4++m
SgE/!+{
name1=Request.Form.GetValues("Username")(0) =BZ?- mIU
name2=Request.Form.GetValues("Username")(1) (HN4g;{
pass1=Request.Form("PassWord1") k,Zm GllQ]
pass2=Request("PassWord2") bO/*2oau
,goBq3[%?
Response.Write("会员1:<b>"&name1&"</b>"&BR) &(xUhX T
Response.Write("密码1:<b>"&pass1&"</b>"&BR) sxED7,A
Response.Write("会员2:<b>"&name2&"</b>"&BR) Y+/lX 6'
Response.Write("密码2:<b>"&pass2&"</b>"&BR) mi2o1"Jd$`
Response.Write("会员:<b>"&Request.Form("Username")&BR) [[)_BmS5r
Response.Write("字段数:"&Request.Form.Count &BR) <Jp1A#
%p
Response.Write("编码:"&EncodingType) fj'jNE
%> NgB 7?]vu
</body> y$tX-9U
</html> n`;R pr&
这个就是最简单一个会员登陆的页面。注册也是这样的,如果在完善一下,加下数据验证的,咱也就是一个专业的网页设计的了 I2HT2c$
Cj;/Uhs
欢迎大家来一起讨论~~我现在学习到数据库方面的了,写的比较慢,学的快的和我联席讨论呀~~~~