·您的位置: 首页 » 资源教程 » 编程开发 » ASP » 查看ASP SESSION 变量的小工具

查看ASP SESSION 变量的小工具

类别: ASP教程  评论数:0 总得分:0
<%@ LANGUAGE="VBSCRIPT" %>
<table border="2" cellspacing="1" bordercolor="#800000" width="100%" id="AutoNumber1" bordercolorlight="#808080" bordercolordark="#FFFFFF" height="37" bgcolor="#D6D3CE">
<%
Dim sessitem


response.write "SessionID: " & Session.SessionID & "<br>"
response.write "List of " & Session.Contents.Count & " items in Session contents collection: "


intItem=1
For Each sessitem in Session.Contents
response.write "<tr>"
If IsObject(Session.Contents(sessitem)) Then
Response.Write "<td>"+CStr(intItem) + "</td>"
Response.Write "<td>"+sessitem+ "</td>"
Response.Write "<td>"+"Session object"+ "</td>"
Else
If IsArray(Session.Contents(sessitem)) Then
Response.Write "<td>"+CStr(intItem) + "</td>"
Response.Write "<td>"+"Array Object "+ "</td>" + "<td>"

For each objArray in Session.Contents(sessitem)
Response.Write "***;"
Next
Response.Write "</td>"

Else
Response.Write "<td>"+CStr(intItem) + "</td>"
Response.Write "<td>"+ sessitem + "</td>"
Response.Write "<td>"+ CStr(Session.Contents(sessitem)) + "</td>"
End If
End If
response.write "</tr>"
intItem=intItem+1
Next

%>
</table>

<br>
<hr>
LIST Application

<hr>
<table border="2" cellspacing="1" bordercolor="#800000" width="100%" id="AutoNumber1" bordercolorlight="#808080" bordercolordark="#FFFFFF" height="37" bgcolor="#D6D3CE">
<%

intItem=1
For Each Key in Application.Contents

Response.Write "<tr>"
If IsObject(Application.Contents(intItem)) Then

Response.Write "<td>"+CStr(intItem) + "</td>"
Response.Write "<td>"+CStr(Key) + "</td>"
Response.Write "<td>"+"Object" + "</td>"

Else
Response.Write "<td>"+CStr(intItem) + "</td>"
Response.Write "<td>"+CStr(Key) + "</td>"
Response.Write "<td>"+CStr(Application.Contents(intItem)) + "</td>"
End If
intItem=intItem+1
Response.Write "</tr>"

Next

%>
</table>
-= 资 源 教 程 =-
文 章 搜 索
关键词:
类型:
范围:
纯粹空间 softpure.com
Copyright © 2006-2008 暖阳制作 版权所有
QQ: 15242663 (拒绝闲聊)  Email: faisun@sina.com
 纯粹空间 - 韩国酷站|酷站欣赏|教程大全|资源下载|免费博客|美女壁纸|设计素材|技术论坛   Valid XHTML 1.0 Transitional
百度搜索 谷歌搜索 Alexa搜索 | 粤ICP备19116064号-1