99re热这里只有精品视频,7777色鬼xxxx欧美色妇,国产成人精品一区二三区在线观看,内射爽无广熟女亚洲,精品人妻av一区二区三区

ASP Contents 集合

2018-09-11 18:05 更新

ASP Contents 集合


Session 對象參考手冊 完整的 Session 對象參考手冊

Contents 集合包含著通過腳本命令添加到 application/session 的所有項目。

提示:要從 Contents 集合中刪除項目,請使用 Remove 和 RemoveAll 方法。

語法

Application.Contents(Key)

Session.Contents(Key)

參數(shù) 描述
key 必需。要取回的項目的名稱。


針對 Application 對象的實例

實例 1

請注意,name 和 objtest 都會被追加到 Contents 集合中:

<%
Application("name")="W3CSchool"
Set Application("objtest")=Server.CreateObject("ADODB.Connection")
%>

實例 2

遍歷 Contents 集合:

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

或者:

<%
For i=1 to Application.Contents.Count
??Response.Write(i & "=" & Application.Contents(i) & "<br>")
Next
%>

實例 3

<%
Application("date")="2001/05/05"
Application("author")="W3CSchool"

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

輸出:

date=2001/05/05
author=W3CSchool


針對 Session 對象的實例

實例 1

請注意,name 和 objtest 都會被追加到 Contents 集合中:

<%
Session("name")="Hege"
Set Session("objtest")=Server.CreateObject("ADODB.Connection")
%>

實例 2

遍歷 Contents 集合:

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

或者:

<%
For i=1 to Session.Contents.Count
??Response.Write(i & "=" & Session.Contents(i) & "<br>")
Next
%>

實例 3

<%
Session("name")="Hege"
Session("date")="2001/05/05"

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

輸出:

name=Hege
date=2001/05/05


Session 對象參考手冊 完整的 Session 對象參考手冊
以上內(nèi)容是否對您有幫助:
在線筆記
App下載
App下載

掃描二維碼

下載編程獅App

公眾號
微信公眾號

編程獅公眾號