Session Events

The Web server automatically creates a session when a user, who did not previously have a session, opens a Web page in the application. The server destroys the session either when it times out or when the server calls the Abandon method.

The session has two events, a Session_OnStart event and a Session_OnEnd event.

You can specify script for these events in the global file, Global.asa. When the session starts, the server looks in the Global.asa file and processes the Session_OnStart event script. This script is processed before the Web page that the user requested is processed. When the session ends, the server processes the Session_OnEnd event script.

Note   Session tracking on by default. If you do not want to track sessions, you can disable sessions with the @ENABLESESSIONSTATE directive.

See Also

Session Object