HttpSessionStateContainer.StaticObjects 属性
定义
获取由 ASP.NET 应用程序文件 Global.asax 中的 <object Runat="Server" Scope="Session"/> 标记声明的对象的集合。Gets a collection of objects declared by <object Runat="Server" Scope="Session"/> tags within the ASP.NET application file Global.asax.
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 文件中声明的对象。An HttpStaticObjectsCollection containing objects declared in the Global.asax file.
实现
注解
如果页面上的对象不支持序列化并且 Mode (SQLServer 或) 进程外,则不会 StateServer 创建对象,也不会将其添加到此集合中。If an object on a page does not support serialization and Mode is out-of-process (SQLServer or StateServer), the object will not be created and will not be added to this collection.
提供 StaticObjects,以便兼容 ASP 的早期版本。StaticObjects is provided for compatibility with earlier versions of ASP.