w3pop.com :: 网络学院 :: ASP :: ASP Static对象 集合
The StaticObjects collection contains all the objects appended to the application/session with the HTML <object> tag.
StaticObjects集合包含了所有的通过HTML<object>标签添加到application/session中的对象。
Application.StaticObjects(Key) Session.StaticObjects(Key) |
| Parameter 参数 |
Description 描述 |
|---|---|
| key | Required. The name of the item to retrieve 必要参数。获取项目的名称 |
|
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 |
|
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 |
评论 (0)
All