Session.StaticObjects コレクション

StaticObjects コレクションには、セッション オブジェクトのスコープ内で <OBJECT> タグを使用して作成されたすべてのオブジェクトが含まれます。StaticObjects コレクションを使用すると、オブジェクトの特定のプロパティの値を調べたり、コレクションに対して繰り返し処理を行って、すべてのオブジェクトのプロパティを取得したりすることができます。

構文

Session.StaticObjects( Key )

 

パラメータ
Key
取得するプロパティです。
解説

ループ制御構造を使用すると、StaticObjects コレクションのすべての要素を対象として繰り返し処理を行うことができます。この例を次に示します。

<%
  Dim objProp
  For Each objProp in Session.StaticObjects
    If IsObject(Session.StaticObjects(objProp)) Then
      Response.write(objProp & " : Session object cannot be displayed."&_
      "<BR>")
    Else
    Response.write(objprop & " : " & Session.StaticObjects(objprop) &_
    "<BR>")
    End if
  Next 
%>

© 1997-2001 Microsoft Corporation.All rights reserved.