共用方式為


IHttpSessionState.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 檔案中所宣告的物件。

範例

下列程式代碼範例會實作 StaticObjects 介面的 IHttpSessionState 屬性。

public HttpStaticObjectsCollection StaticObjects
{
  get { return pStaticObjects; }
}
Public ReadOnly Property StaticObjects As HttpStaticObjectsCollection _
  Implements IHttpSessionState.StaticObjects

  Get
    Return pStaticObjects
  End Get
End Property

備註

提供 StaticObjects 的目的,是為了與 ASP 的舊版本相容。

適用於

另請參閱