Export (0) Print
Expand All

SessionStateActions Enumeration

Identifies whether a session item from a data store is for a session that requires initialization.

This enumeration has a FlagsAttribute attribute that allows a bitwise combination of its member values.

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

[FlagsAttribute]
public enum SessionStateActions

Member nameDescription
InitializeItemThe session item from the data store is for a session that requires initialization.
NoneNo initialization actions need to be performed by the calling code.

The SessionStateActions enumeration is used by the GetItem and GetItemExclusive methods of a SessionStateStoreProviderBase implementation. When a session item is retrieved from the data store, the enumeration value indicates whether the session requires initialization or not based on a value stored with the data. The GetItem and GetItemExclusive methods set an actions parameter to a SessionStateActions enumeration value based on this value retrieved with the session item. If the value of the actions parameter is set to InitializeItem, the SessionStateModule initializes the session and executes the Session_OnStart event defined in the Global.asax file for the ASP.NET application. If the value of the actions parameter is None, no additional steps are taken for the current session.

A session item created by the CreateUninitializedItem method is created with a value indicating that the item requires initialization and that the GetItem and GetItemExclusive methods should set the actions parameter to InitializeItem.

For an example of a session-state store provider implementation that uses the SessionStateActions enumeration, see Implementing a Session-State Store Provider.

.NET Framework

Supported in: 4.5.2, 4.5.1, 4.5, 4, 3.5, 3.0, 2.0

Windows 8.1, Windows Server 2012 R2, Windows 8, Windows Server 2012, Windows 7, Windows Vista SP2, Windows Server 2008 (Server Core Role not supported), Windows Server 2008 R2 (Server Core Role supported with SP1 or later; Itanium not supported)

The .NET Framework does not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.

Show:
© 2014 Microsoft