当前位置: 首页 > 网络学院 > 服务端脚本教程 > ASP > ASP Static对象 集合

ASP
ASP 介绍
ASP Install
ASP 语法
ASP 变量
ASP Procedures
ASP Forms
ASP Cookies
ASP Session
ASP Application
ASP #include
ASP Global.asa
ASP Send e-mail
ASP Response
ASP Request
ASP Application
ASP Session
ASP Server
ASP Error
ASP FileSystem
ASP TextStream

ASP Static对象 集合


出处:互联网   整理: 软晨网(RuanChen.com)   发布: 2009-03-04   浏览: 446 ::
收藏到网摘: n/a

The StaticObjects collection contains all the objects appended to the application/session with the HTML <object> tag.
StaticObjects集合包含了所有的通过HTML<object>标签添加到application/session中的对象。

Syntax
语法

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

Parameter
参数
Description
描述
key Required. The name of the item to retrieve
必要参数。获取项目的名称

Examples for the Application Object
Application对象举例

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
Session对象举例

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

登陆 | 还没注册?