Previous PageNext Page

6.5.2 Contents Collection

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

Syntax

Session.Contents(key)

Parameters

key
The name of the item 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

%>


Copyright © 2000 Chili!Soft

Previous PageTop Of PageNext Page