User Tools

Site Tools


dump_the_session_variable

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
dump_the_session_variable [2009/01/14 23:51] stephendump_the_session_variable [2017/01/01 20:05] (current) – external edit 127.0.0.1
Line 25: Line 25:
 End Try End Try
 </code> </code>
 +
 +Or try this:
 +
 +<code VB>
 +' Dump the session variable
 +Debug.WriteLine("****************** " + Now().ToShortDateString() + " " + Now().ToShortTimeString() + " ******************")
 +Debug.Indent()
 +For i = 0 To Session.Keys.Count - 1
 + key = Session.Keys.Item(i)
 + If Session.Item(i) Is Nothing Then
 + type = "(Null)"
 + Else
 + type = Session.Item(i).GetType().ToString()
 + End If
 + If type.StartsWith("System.String") Or type.StartsWith("System.Int") Or type.StartsWith("System.Boolean") Then
 + Debug.WriteLine("Session(""" + key + """) as " + type + " : " + CType(Session.Item(i), String))
 + Else
 + Debug.WriteLine("Session(""" + key + """) as " + type)
 + End If
 +Next
 +Debug.Unindent()
 +Debug.Flush()
 +</code>
 +
 +
  
 {{tag>code_snippet vb session_variable}} {{tag>code_snippet vb session_variable}}
dump_the_session_variable.1231977107.txt.gz · Last modified: 2017/01/01 19:49 (external edit)

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki