阿七
级别: 未验证会员
精华:
0
发帖: 909
威望: 0 点
金钱: 2161 RMB
贡献值: 0 点
在线时间:512(小时)
注册时间:2006-03-29
最后登录:2008-08-07
|
Asp遍历服务器对象的代码
一 遍历Request ,[D,G 方式1:
^GB9!d. <% &-470Z%/ For Each r In Request.QueryString dMp7 ,{FhF Response.Write "Request("""&r&""") = " & Request(r) J@
=1zL Response.Write "<p>" xYtY}?!" Next 0e^j :~* %> &%ej=O 方式2: G9<pYt{: <% P>z k For i = 1 To Request.QueryString.Count OziG|o@I Response.Write "Request("""&Request.QueryString.Key(i)&""") = " & Request.QueryString(Request.QueryString.Key(i)) lNs 'jaD Response.Write "<p>" >&f .^p Next p{"p<XFyO %>
.taJCE 将QueryString改为Form,即可遍历Post变量。 /XjIm4EN 二 遍历Session L"rLalUw <% \7nlwFAO Session("key1")="value1" Oj:O-PtN2 Session("key2")="value2" l!lt
gj For Each s In Session.Contents w;vp X> Response.Write "Session("""&s&""") = " & Session(s) [R)?93 Response.Write "<p>" pv+FPB Next {c<MB xk %> E1_FK1*V; 二 遍历Application [-f0s;F1% <% DZ?>9W{ Application("key1")="value1" j0L9Q|s Application("key2")="value2" M@UkXA} For Each a In Application.Contents udX4SBq-pC Response.Write "Application("""&a&""") = " & Application(a) ',n;ag`c Response.Write "<p>" eC%.xu^ Next `W
e M %>
|
|
[楼 主]
|
Posted: 2006-04-04 14:28 |
| |