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 的早期版本。

适用于

另请参阅