Easy Tutorial
❮ Met Contents Removeall App Prop Count ❯

ASP Session_OnStart and Session_OnEnd Events



Session_OnStart Event

The Session_OnStart event occurs when the server creates a new session.

This event is placed in the Global.asa file.

Session_OnEnd Event

The Session_OnEnd event occurs when the session ends (when the session is abandoned or times out).

This event is placed in the Global.asa file.

Note: The MapPath method cannot be used in Session_OnEnd code.

Syntax


Example

Global.asa:

Displaying the current number of visitors in an ASP file:


❮ Met Contents Removeall App Prop Count ❯