StaticObjects 集合包含所有使用 HTML 的 <object> 标签追加到 application/session 的对象。
Application.StaticObjects(Key) Session.StaticObjects(Key)
参数 | 描述 |
---|---|
key | 必需。要取回的项目的名称。 |
循环遍历 StaticObjects 集合:
<% for each x in Application.StaticObjects Response.Write(x & "<br />") next %>
在 Global.asa 中:
<object runat="server" scope="application" id="MsgBoard" progid="msgboard.MsgBoard"> </object> <object runat="server" scope="application" id="AdRot" progid="MSWC.AdRotator"> </object>
在 ASP 文件中:
<% for each x in Application.StaticObjects Response.Write(x & "<br />") next %>
输出:
MsgBoard AdRot
循环遍历 StaticObjects 集合:
<% for each x in Session.StaticObjects Response.Write(x & "<br />") next %>
在 Global.asa 中:
<object runat="server" scope="session" id="MsgBoard" progid="msgboard.MsgBoard"> </object> <object runat="server" scope="session" id="AdRot" progid="MSWC.AdRotator"> </object>
在 ASP 文件中:
<% for each x in Session.StaticObjects Response.Write(x & "<br />") next %>
输出:
MsgBoard AdRot