Connecting Tech Pros Worldwide Forums | Help | Site Map

include file in global.asa

abcd
Guest
 
Posts: n/a
#1: Sep 30 '06
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.



Evertjan.
Guest
 
Posts: n/a
#2: Sep 30 '06

re: include file in global.asa


abcd wrote on 30 Sep 2006 in microsoft.public.inetserver.asp.general:
Quote:
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)
Patrice
Guest
 
Posts: n/a
#3: Oct 2 '06

re: include file in global.asa


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" <abcd@abcd.coma écrit dans le message de news:
%23HZoFKC5GHA.3604@TK2MSFTNGP03.phx.gbl...
Quote:
>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.
>

Anthony Jones
Guest
 
Posts: n/a
#4: Oct 2 '06

re: include file in global.asa



"abcd" <abcd@abcd.comwrote in message
news:%23HZoFKC5GHA.3604@TK2MSFTNGP03.phx.gbl...
Quote:
I have written general purpose functions in one of the include file, I
want
Quote:
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.



Aleks_Kleyn@MailAPS.org
Guest
 
Posts: n/a
#5: Oct 3 '06

re: include file in global.asa


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

Bob Barrows [MVP]
Guest
 
Posts: n/a
#6: Oct 3 '06

re: include file in global.asa


Aleks_Kleyn@MailAPS.org wrote:
Quote:
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.


Anthony Jones
Guest
 
Posts: n/a
#7: Oct 3 '06

re: include file in global.asa



<Aleks_Kleyn@MailAPS.orgwrote in message
news:1159883350.162127.307990@k70g2000cwa.googlegr oups.com...
Quote:
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 ;)


Closed Thread


Similar ASP / Active Server Pages bytes