The ASP Session_OnStart Event occurs when the session starts. It occurs when the server creates a session Object. This event is taken place in the Global.asa File.
The ASP Session_OnEnd Event occurs when the session ends or closed. It occurs when the abandoned method is call and when the session Timeout period is over. This event is taken place on the Global.asa File.
<SCRIPT LANGUAGE=ScriptLanguage RUNAT=Server> Sub Session_OnStart . . . End Sub </SCRIPT>
- ScriptLanguage: It defines the Language of the script which is used to write an event script. It supported different scripting languages, such as VBScript or JScript.
Example: Below code used to display the number of visitors in an ASP File.
There are online now!
Attention reader! Don’t stop learning now. Get hold of all the important DSA concepts with the DSA Self Paced Course at a student-friendly price and become industry ready.