Global.asa Performance Question

Results 1 to 2 of 2

Thread: Global.asa Performance Question

  1. #1
    Join Date
    Dec 1969

    Default Global.asa Performance Question

    Have piece of code that I want to run each time any page from my site is accessed.<BR><BR>Rather than adding this code each time I create another page, can I place it in the Global.asa once, and get the same result?<BR><BR>Are there significant performance penalties for doing it this way?

  2. #2
    Join Date
    Dec 1969

    Default can't do it with global.asa

    Global.asa supports Application_onStart and Session_onStart, but *NOT* Page_onStart. <BR><BR>Of course, you *could* turn off sessions, I suppose, and then the Session_onStart would get invoked for each page, because the system would see each page as a new session. I&#039;ve never tried this.<BR><BR>Yes, there is a noticable penalty for using Global.asa, since the code does *NOT* execute in the "scope" of the current ASP page but instead has to be invoked as a separate operation.<BR><BR>Your best bet is to put the code in a #include file and include the file on each page.<BR><BR>

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts