Small Tool for viewing ASP session Variables

Source: Internet
Author: User
<% @ Language = "VBScript" %>
<%
'####################################### ##############
'Function:
'List Server session variable & Application variable
'Author: hard he
'Date:
'Memo: Be care for diffrent using ul path show diffrent session
'####################################### ##############
%>
<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>

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.