Sun Chili!Soft ASP Sun Chili!Soft
ASP Sun Microsystems

 

ASP Session Object 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: ASP Session Object Contents Collection

Session.Contents( key )

Parameters: ASP Session Object Contents Collection

key

The name of the item to retrieve.

Remarks: ASP Session Object Contents Collection

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 2002 Sun Microsystems, Inc. All rights reserved. Legal Notice.