<script language=VBScript RUNAT=Server>
'You can add special event handlers in this file that will get run automatically when
'special Active Server Pages events occur. To create these handlers, just create a
'subroutine with a name from the list below that corresponds to the event you want to
'use. For example, to create an event handler for Session_OnStart, you would put the
'following code into this file (without the comments):
'EventName Description
'Session_OnStart Runs the first time a user runs any page in your application
'Session_OnEnd Runs when a user's session times out or quits your application
'Application_OnStart Runs once when the first page of your application is run for the first time by any user
'Application_OnEnd Runs once when the web server shuts down
Sub Application_OnStart
'für Übung 5.1
Application("strwelcome") = "Herzlich willkommen"
'für Übung 5.2
Application("intsessioncounter") = 0
End Sub
Sub Session_OnStart
'Diese Technik sollte nur ausnahmsweise verwendet werden
'V.a. bei Webapplikationen mit vielen Usern gleichzeitig kann es zu
'Blockierungen kommen!
Application.Lock
Application("intsessioncounter") = Application("intsessioncounter") + 1
Application.UnLock
End Sub
</script>
Demo: uebungen/global.asa
Letzter Update:
26.12.2021 16:48
Zurück zur
Liste mit ASP-Übungen auf
www.ecotronics.ch