COLLECTION PROPERTY:  Session.StaticObjects

Session.StaticObjects(Key)

The StaticObjects collection property contains a list of all of the items that have been created and added to the Session object using the HTML <OBJECT> tag.

You can iterate through a collection using a For Each item in ... Next loop.

There is one mandatory argument.

Key

The Key argument is the name of the item to retrieve.

Code:
----------Global.asa-------------
<OBJECT RUNAT=Server SCOPE=Session ID=MyInfo PROGID="MSWC.MyInfo">
</OBJECT>
 
<OBJECT RUNAT=Server SCOPE=Session ID=MyConnection PROGID="ADODB.Connection">
</OBJECT>
 
<OBJECT RUNAT=Server SCOPE=Session ID=MyADRot PROGID="MSWC.ADRotator">
</OBJECT>
 
-----------File.asp-----------------
<%
For Each Item In Session.StaticObjects
Response.Write Item & "<BR>"
Next
%>

 
Output:
MyInfo
MyConnection
MyADRot
Copyright 1999-2001 by Infinite Software Solutions, Inc. All rights reserved.
Trademark Information