when the application/session starts or application/session ends ,it is necessary to tell the application and session objects in Glogal.asa about the work to be done. The code for this is
placed in event handlers. The Global.asa file uses four
types of events: Application_OnStart - This event
occurs in an ASP application when the FIRST user calls the first page from . This event occurs after the Global.asa file is edited or after the Web server is restarted. The "Session_OnStart"
event occurs immediately after this event.
Session_OnStart - In the ASP application,this event occurs EVERY time a NEW
user requests his or her first page .
Session_OnEnd - EVERY time a user
ends a session, this event occurs. After a page has not been
requested by the user for a specified time (by default this is
20 minutes),a user ends a session .
Application_OnEnd - Aafter the LAST
user has ended the session,this event occurs. Typically, this event occurs when a
Web server stops. To clean up settings after the Application stops,this procedure is used like delete records or write
information to text files.
A Global.asa file could look something like this:
|