vb Loop through Session

Dim i
Dim j
j = Session.Contents.Count

Response.Write "<table border=""1"">"
Response.Write "<tr><td><strong>Session variables</strong></td><td><strong>" & j & "</strong></td></tr>"

For Each i in Session.Contents
	Response.Write "<tr>"
	Response.Write "<td>" & i & "</td>"
	Response.Write "<td>" & Session.Contents(i) & " </td>"
	Response.Write "</tr>"
Next

Response.Write "</table>"
Loops through all variables in the Session.

Updated: Thursday 7th October 2010, 14:45pm

There are 0 comments

Leave a comment of your own

Comments are currently closed.