Open In App

ASP Application.StaticObjects Collection

The Application.StaticObjects Collection in ASP is used to store all the objects created by using the <object> tag within the scope of the Application object.  

Syntax



Application.StaticObjects( Key )  

Parameter Values  

Example: 






<object runat="server" 
        scope="session"
        id="MsgBoard" 
        progid="msgboard.MsgBoard">
</object>
  
<object runat="server" 
        scope="session"
        id="AdRot" 
        progid="MSWC.AdRotator">
</object>

ASP code: Below code uses an iterating control structure to loop through the keys of the StaticObjects Collection.




<%
for each x in Session.StaticObjects
Response.Write(x & "<br>")
next
%>

Output:

MsgBoard
AdRot
Article Tags :