Doesn't this impose a performace issue? doesn't global.asa get read
everytime, by every script? What happens if you have a lot of arb stuff in
global.asa, which is only used in one script, each one of those items as
needed? Won't this have performance implications on the whole site?
--
Kind Regards
Rudi Ahlers
+27 (82) 926 1689
Greater love has no one than this, that he lay down his life for his friends
(John 15:13).
"Bob Barrows [MVP]" <re******@NOyahoo.SPAMcom> wrote in message
news:#g**************@TK2MSFTNGP11.phx.gbl...
Woody wrote:
I have a page that is linked into by other pages that pass it query
strings, it then reads a config file, displays 1 of several forms,
gets posted to itself, depending upon users response may display a
different form etc etc.
I want to take the config data and have that read by a globals.asa and
then use application("VariableName") to reference it.
i also want to take the initial query strings and load them into
session variables.
Problem is, whats does a globals.asa file look like? how do i build
one? how do i make it referenced in my page?
Here is the default global.asa page created by Interdev:
************************************************** ****************
<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):
'Sub Session_OnStart
'**Put your code here **
'End Sub
'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
</SCRIPT>
<SCRIPT LANGUAGE=VBScript RUNAT=Server>
Sub Application_OnStart
End Sub
</SCRIPT>
************************************************** *********
The global.asa page is run whenever one of the 4 events mentioned in the
comments section above occurs. You do NOT refer to global.asa in any of your
other pages. You simply use the application and session variables that may
have been created in global.asa.
HTH,
Bob Barrows
--
Microsoft MVP - ASP/ASP.NET
Please reply to the newsgroup. This email account is my spam trap so I
don't check it very often. If you must reply off-line, then remove the
"NO SPAM"