System.Web.SessionState.SessionStateUtility.GetSessionStaticObjects Method

Gets a reference to the static objects collection for the specified context.

Syntax

public static System.Web.HttpStaticObjectsCollection GetSessionStaticObjects (System.Web.HttpContext context)

Parameters

context
The System.Web.HttpContext from which to get the static objects collection.

Returns

An System.Web.HttpStaticObjectsCollection collection populated with the HttpSessionState.StaticObjects property value for the specified System.Web.HttpContext.

Remarks

The SessionStateUtility.GetSessionStaticObjects(System.Web.HttpContext) method is used to retrieve the collection of static objects defined in the Global.asax file for the ASP.NET application. A session-state module implementation will supply the returned System.Web.HttpStaticObjectsCollection collection to the System.Web.SessionState.IHttpSessionState implementation instance that is added to the current context using the SessionStateUtility.AddHttpSessionStateToContext(System.Web.HttpContext, IHttpSessionState) method.

A System.Web.SessionState.SessionStateStoreProviderBase can also use the SessionStateUtility.GetSessionStaticObjects(System.Web.HttpContext) method when creating a System.Web.SessionState.SessionStateStoreData object.

Requirements

Namespace: System.Web.SessionState
Assembly: System.Web (in System.Web.dll)
Assembly Versions: 2.0.0.0