SageFix. LetsFix!  
Current Location : Home > Web Development > Classic ASP > functions: global.asa or includes? Share/Save/Bookmark    

Main Menu
SageFix - Let's Fix

Board Categories
    Web Site Designing
- Graphics
    Web Development
- .NET
- Classic ASP
- JavaScript
- PHP
    WebSite Management
- Promotion Techniques
- Search Engine Optimization
    Databases
- MySQL

Tutorials

Database Connection Strings

  Contact Us


 1 - 4 of 4 [Total 1 Pages]  
functions: global.asa or includes?      Dec 10, 2001, 10:20 1
  
Is it better to store functions in gloabal.asa or in an include file or does it matter?

 
      Dec 11, 2001, 02:02 2
  
I have never heard of storing functions in Global.asa file. Store all your functions in a separate file that you can include.

I think the code in the Global.asa file is executed only at the beginning of the session or at the start of the application (IIS service).

 
      Dec 11, 2001, 03:24 3
  
There is no way to keep a function in the global.asa file. You could keep the name of the include and use the server.execute() command to include it like so:

Code:
server.execute(application("includeFileName"))
Bear in mind that this will only work with ASP 3. But trying to use the application object in an include code will not work, like so:

Code:
<!--#include file="<%=application("includeFileName")%>"-->
This is becuse the server-side include is executed BEFORE the ASP is, so it would create an "include page not found" error

Hope that this helps


 
      Dec 11, 2001, 07:34 4
  
OK. Thanks for the clarification.

 
 1 - 4 of 4 [Total 1 Pages]  









Subscribe to our mailing list
email


Current Location : Home > Web Development > Classic ASP > functions: global.asa or includes? Share/Save/Bookmark    

Development problem? SageFix is completely free -- paid for by advertisers and donations. Click here to Contact Us If you have any query. Enjoy!
Request processed in 7.0E-5 seconds Home - Contact Us - Terms Of Service - Privacy Policy - Copyrights - Top
Advertisements do not imply our endorsement of that product or service.
Current server time now is 09-Sep-2010 09:36:31
Copyright © 2009 Sagefix Inc. All rights reserved.
Powered By SageFix