ASP » Application » StaticObjects

Syntax:
Application.StaticObjects(Key)
Key
The Key argument is the name of the item to be retrieved.

A collection of all of the items which have been created and added to the Application object during client sessions by using the HTML <OBJECT> tag, rather than using script commands.

The StaticObjects collection property is a collection that contains of all of the items created within the Application using the HTML <OBJECT> tag. You can use this collection to find the value of any property for any object.

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

There is one mandatory argument.

Examples

Code:
----------Global.asa-------------
<OBJECT RUNAT=Server SCOPE=Application ID=MyInfo PROGID="MSWC.MyInfo">
</OBJECT>

<OBJECT RUNAT=Server SCOPE=Application ID=MyConnection PROGID="ADODB.Connection">
</OBJECT>

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