WP TutorialLesson 6Free preview
WebPages Global
This lesson is part of ASP · All levels
Summary
Global files like Global.asa allow you to run code at critical moments in the application lifecycle, such as when an application starts, a session is created, or an application ends. So a joint initialisation like setting up a connection or global variable only needs to be done once. Understanding this lifecycle is important so that the application does not repeat the same job on every request.
Key points
- It hosts events such as Application_OnStart, Application_OnEnd, Session_OnStart, and Session_OnEnd.
- The application is valid for all users, while the session is for one visitor only.
- Event Application_OnStart runs once when the app is first accessed.
- Initiation codes should be placed on the startup event, not on every page.
Full lesson
Code examples and quizzes
Full lessons, code examples, and quizzes are available to subscribers. 5 questions.