System.Web.SessionState.SessionStateModule.Start Event

The event that occurs when a session is created.

Syntax

public event EventHandler Start

Remarks

The SessionStateModule.Start event is raised at the beginning of a request when a new session is started. A new session is started if a request is made that does not contain a session identifier, the session identifier is invalid, or the session associated with a session identifier has expired.

The Session_OnStart event is used to perform any initialization work for a session such as setting up default values for session variables.

You can specify a handler for the SessionStateModule.Start event by adding a public subroutine named Session_OnStart to the Global.asax file.

For more information about the Global.asax file, see Global.asax Syntax.

Requirements

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