472,344 Members | 1,246 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 472,344 software developers and data experts.

include file in global.asa

I have written general purpose functions in one of the include file, I want
to use the same in the global.asa. Do you know how to use include file in
global.asa

thanks in advance.
Sep 29 '06 #1
6 2762
abcd wrote on 30 Sep 2006 in microsoft.public.inetserver.asp.general:
I have written general purpose functions in one of the include file, I
want to use the same in the global.asa. Do you know how to use include
file in global.asa
This has no use, since global.asa is only executed at the beginning of an
application, and the sub session_onstart only at the beginning of a
session, so your include wil not be not part of any page.

the functions will not be available,
[unless you put them in strings as application or session variables,
which still needs them to be eval()ed on page].

Better include all relevant .asp pages with your include.

--
Evertjan.
The Netherlands.
(Please change the x'es to dots in my emailaddress)
Sep 30 '06 #2
You'll have to include your file in all pages. My personal preference is to
have a least a single file that is always included in all pages. Then this
general include file includes in turns general purpose files. This way if I
want to add something adding it to the general include file will be enought.

--
Patrice

"abcd" <ab**@abcd.coma écrit dans le message de news:
%2****************@TK2MSFTNGP03.phx.gbl...
>I have written general purpose functions in one of the include file, I want
to use the same in the global.asa. Do you know how to use include file in
global.asa

thanks in advance.

Oct 2 '06 #3

"abcd" <ab**@abcd.comwrote in message
news:%2****************@TK2MSFTNGP03.phx.gbl...
I have written general purpose functions in one of the include file, I
want
to use the same in the global.asa. Do you know how to use include file in
global.asa

thanks in advance.

Global.asa file is just another ASP file. You can include another file as
you would in any other ASP file.

Oct 2 '06 #4
My experiance shows that when we use include in asp page it is hard to
manage proper design of this page. If you need to keep the same
functionality in different asp pages you can create separate class or
web user control.
Aleks Kleyn

Oct 3 '06 #5
Al*********@MailAPS.org wrote:
My experiance shows that when we use include in asp page it is hard to
manage proper design of this page. If you need to keep the same
functionality in different asp pages you can create separate class or
web user control.
Aleks Kleyn
"web user control"? In classic ASP?
--
Microsoft MVP -- ASP/ASP.NET
Please reply to the newsgroup. The email account listed in my From
header is my spam trap, so I don't check it very often. You will get a
quicker response by posting to the newsgroup.
Oct 3 '06 #6

<Al*********@MailAPS.orgwrote in message
news:11**********************@k70g2000cwa.googlegr oups.com...
My experiance shows that when we use include in asp page it is hard to
manage proper design of this page. If you need to keep the same
functionality in different asp pages you can create separate class or
web user control.
Aleks Kleyn
If you are saying that it isn't a good idea to allow includes to generate
output to response just by being included I would agree with you. I use
includes to provide access to a library of functions (usually encased in
classes to avoid name collisions). That was the gist of the OP though.
Thanks for sharing though ;)
Oct 3 '06 #7

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

6
by: JStrummer | last post by:
I have a question regarding paths and the include() statement in PHP. I develop in a Windows environment and will be publishing to a Linux...
6
by: Tom | last post by:
I'm tying myself in knots trying to figure out variable scope with constants and include files. This is what I'm doing: A page (index.php) on my...
4
by: Tom Bates | last post by:
Possible? It seems nobody knows how... :-) Tom
6
by: atv | last post by:
Alright, i have some questions concerning include files en global variables.I hope someone is willing to answer these. 1).Why is it that if i...
44
by: Neil Cerutti | last post by:
In Rob Pike's style guide he urges the following: Simple rule: include files should never include include files. If instead they state...
5
by: David Mathog | last post by:
One thing that can make porting C code from one platform to another miserable is #include. In particular, the need to either place the path to an...
14
by: Wescotte | last post by:
I have an application that uses several file formats for similar data. So I've created various php files for each format containing the same...
19
by: SteveT | last post by:
Is it possible to have an include file that resides outside of the web site parent folder? For instance, lets say you have several websites under...
6
by: Royan | last post by:
Ok the problem is quite hard to explain, but i'll try to keep it as simple as i can. Imagine I have the following structure of my files and...
0
by: concettolabs | last post by:
In today's business world, businesses are increasingly turning to PowerApps to develop custom business applications. PowerApps is a powerful tool...
0
by: Kemmylinns12 | last post by:
Blockchain technology has emerged as a transformative force in the business world, offering unprecedented opportunities for innovation and...
0
by: Naresh1 | last post by:
What is WebLogic Admin Training? WebLogic Admin Training is a specialized program designed to equip individuals with the skills and knowledge...
0
jalbright99669
by: jalbright99669 | last post by:
Am having a bit of a time with URL Rewrite. I need to incorporate http to https redirect with a reverse proxy. I have the URL Rewrite rules made...
0
by: antdb | last post by:
Ⅰ. Advantage of AntDB: hyper-convergence + streaming processing engine In the overall architecture, a new "hyper-convergence" concept was...
0
by: Matthew3360 | last post by:
Hi there. I have been struggling to find out how to use a variable as my location in my header redirect function. Here is my code. ...
0
by: AndyPSV | last post by:
HOW CAN I CREATE AN AI with an .executable file that would suck all files in the folder and on my computerHOW CAN I CREATE AN AI with an .executable...
0
by: Arjunsri | last post by:
I have a Redshift database that I need to use as an import data source. I have configured the DSN connection using the server, port, database, and...
0
hi
by: WisdomUfot | last post by:
It's an interesting question you've got about how Gmail hides the HTTP referrer when a link in an email is clicked. While I don't have the specific...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.