return session details

D

Don Grover

Does any one have an asp page they can share that returns current session
details, cookies etc.

I can't get session arrays to return in a page.
 
C

Chris Hohmann

Don Grover said:
Does any one have an asp page they can share that returns current session
details, cookies etc.

I can't get session arrays to return in a page.
<%
Function DebugDump()
Dim item
Dim o
o=""
o=o & "<table>"
' o=o & "<tr><th colspan='2'>Attributes</th></tr>"
' For Each item in attributes
' o=o & "<tr><td>" & item & "</td><td>" & attributes(item) &
"</td></tr>"
' Next
o=o & "<tr><th colspan='2'>QueryString</th></tr>"
For Each item in Request.QueryString
o=o & "<tr><td>" & item & "</td><td>" & Request.QueryString(item) &
"</td></tr>"
Next
o=o & "<tr><th colspan='2'>Form</th></tr>"
For Each item in Request.Form
o=o & "<tr><td>" & item & "</td><td>" & Request.Form(item) &
"</td></tr>"
Next
o=o & "<tr><th colspan='2'>Cookies</th></tr>"
For Each item in Request.Cookies
o=o & "<tr><td>" & item & "</td><td>" & Request.Cookies(item) &
"</td></tr>"
Next
o=o & "<tr><th colspan='2'>Client Certificate</th></tr>"
For Each item in Request.ClientCertificate
o=o & "<tr><td>" & item & "</td><td>" &
Request.ClientCertificate(item) & "</td></tr>"
Next
o=o & "<tr><th colspan='2'>ServerVariables</th></tr>"
For Each item in Request.ServerVariables
o=o & "<tr><td>" & item & "</td><td>" & Request.ServerVariables(item)
& "</td></tr>"
Next
o=o & "<tr><th colspan='2'>Session</th></tr>"
For Each item in Session.Contents
If IsObject(Session.Contents(item)) Then
o=o & "<tr><td>" & item & "</td><td>[Object]</td></tr>"
Else If IsArray(Session.Contents(item)) Then
o=o & "<tr><td>" & item & ":</td><td>[Array]</td></tr>"
Dim ArrayItem
For Each ArrayItem In Session.Contents(item)
o=o & "<tr><td>&nbsp;</td></td><td>" & ArrayItem & "</td></tr>"
Next
Else
o=o & "<tr><td>" & item & "</td><td>" & Session.Contents(item) &
"</td></tr>"
End If
End If
Next
o=o & "</table>"
DebugDump=o
End Function
%>
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,054
Latest member
TrimKetoBoost

Latest Threads

Top