Session Contents Collection

The Session.Contents collection contains all of the items that have been established for a session without using the <OBJECT> tag. The collection can be used to determine the value of a specific session item, or to iterate through the collection and retrieve a list of all items in the session.

Syntax

Session.Contents( Key )
 

Parameters

Key
The name of the property to retrieve.

Remarks

You can use an iterating control structure to loop through the keys of the Contents collection. This is demonstrated in the following example.

<%
Dim sessitem
For Each sessitem in Session.Contents
  Response.write(sessitem & " : " & Session.Contents(sessitem) & "<BR>")
Next 
%>