How can I list all my session variables?

M

michaaal

I would like to be able to list the names of all of my session variables.
Maybe something like this...

<%
response.write(AllSessionVariableNames)
%>

Can this be done??
 
R

Ray at

You can do something like:

<%
for each x in session.contents
response.write x & " = " & session.contents(x) & "<br>"
next
%>
 
R

Rob Greene

This will get those unknown items from the session variables
-rwg

<%
for each itm in session.contents
response.write( "<br>" & itm & " = " & session.contents(itm) )
next
%>
 
T

Tony T

Dim j As Integer =
For j = 0 To Session.Contents.Count -
Response.Write(CType(Session.Keys(j), String) & "=" & CType(Session.Contents(j), String) & "<br>"
Next
 

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,581
Members
45,055
Latest member
SlimSparkKetoACVReview

Latest Threads

Top