다음을 통해 공유


HttpSessionState.StaticObjects 속성

정의

ASP.NET 애플리케이션 파일 Global.asax 내에서 태그로 선언된 <object Runat="Server" Scope="Session"/> 개체의 컬렉션을 가져옵니다.

public:
 property System::Web::HttpStaticObjectsCollection ^ StaticObjects { System::Web::HttpStaticObjectsCollection ^ get(); };
public System.Web.HttpStaticObjectsCollection StaticObjects { get; }
member this.StaticObjects : System.Web.HttpStaticObjectsCollection
Public ReadOnly Property StaticObjects As HttpStaticObjectsCollection

속성 값

HttpStaticObjectsCollection Global.asax 파일에 선언된 포함하는 개체입니다.

예제

다음 코드 예제에서는 컬렉션에 있는 id 개체의 개체 형식 및 개체를 나열합니다 StaticObjects .

foreach (System.Collections.DictionaryEntry de in Session.StaticObjects)
  Response.Write(de.Key + " is of type " + de.Value.GetType().ToString() + "<br />");
For Each de As System.Collections.DictionaryEntry In Session.StaticObjects
  Response.Write(String.Format("{0} is of type {1}<br />", de.Key, de.Value.GetType()))
Next

설명

페이지의 개체가 serialization Mode 을 지원하지 않고 out-of-process(SQLServer 또는 StateServer)이면 개체가 만들어지지 않으며 이 컬렉션에 추가되지 않습니다.

StaticObjects 속성은 이전 버전의 ASP와의 호환성을 위해 제공됩니다.

적용 대상

추가 정보