ASP StaticObjects Collection

## ASP Tutorial

ASP HOME ASP Introduction ASP Install ASP Syntax ASP Variables ASP Procedures ASP Forms ASP Cookies ASP Session ASP Application ASP #include ASP Global.asa ASP Send e-mail

## ASP Objects

ASP Response ASP Request ASP Application ASP Session ASP Server ASP Error ASP FileSystem ASP TextStream ASP Drive ASP File ASP Folder ASP Dictionary ASP ADO

## ASP Components

ASP AdRotator ASP BrowserCap ASP Content Linking ASP Content Rotator

## ASP and AJAX

AJAX Intro AJAX ASP AJAX Database

## ASP Summary

ASP Quick Ref ASP Summary

## ASP Examples

ASP Examples ASP Quiz ASP Certificate

# ASP StaticObjects Collection

Complete Session Object Reference

The StaticObjects collection contains all the objects appended to the application/session with the HTML <object> tag.

## Syntax

Application.StaticObjects(Key)
Session.StaticObjects(Key)

Parameter | Description
--- | ---
key | Required. The name of the item to retrieve

## Examples for the Application Object

### Example 1

To loop through the StaticObjects collection:

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

### Example 2

In Global.asa:

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

In an ASP file:

<%
for each x in Application.StaticObjects
Response.Write(x & "<br>")
next
%>
Output:
MsgBoard
AdRot

## Examples for the Session Object

### Example 1

To loop through the StaticObjects collection:

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

### Example 2

In Global.asa:

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

In an ASP file:

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

Complete Session Object Reference

## Your suggestion:

Your E-mail (optional):

Page address:

Description:

Close [X]

## Thank You For Helping Us!

Your message has been sent to W3Schools.

Close [X]
Search w3schools.com:

## WEB HOSTING

Best Web Hosting UK Reseller Hosting Wow! $5 SSD Hosting

## WEB BUILDING

Download XML Editor
FREE Website BUILDER FREE Website Creator

## WEB RESOURCES

Web Statistics Web Validation

## SHARE THIS PAGE