Global.asa and including custom asp class?

D

dennis.eklund

Hi...

I have a question that about global.asa and including a custom made class.
Wonder if it's possible and if so, how?

What I want is to set up my class global for the site, I made a asp file
called cls_utils.asp
and currently calling the <!-- include #file--> command in the default web
page,
and then Set util = MyUtils.
It would be nice to have this in the global.asa file instead of creating and
destroying the object all the time.
Is it possible to make a global object within global.asa with a custom class
file?
Hope this make sense =)

/Dennis
(running iis5)

example:
----global.asa------
<object runat="server" scope="session" id="util" ...dont know the rest
(classes/cls_utils.asp?).....>
--------------------

----cls_utils.asp----
Class MyUtils
public function SomeThing(strText)
something = strText
end function
End Class
--------------------

----default.asp-----
<html>
.....
....
<% = util.something("Does this work?") %>
--------------------
 
D

dlbjr

Personally, I would open and close per page as needed.


'from dlbjr

'Unambit from meager knowledge of inane others,engender uncharted sagacity.
 
D

dennis.eklund

Thanks for your reply, but it didnt help me much =)

What are the adventages/disadventages for the different models?
My current layout is one default.asp page, from there I use serverside
include for
different pages, this means that for every page link a user press the
default.asp page will run.
This makes my classes to be created and destroyed every time the page is
refreshed.
Would still like to know if it's possible to create theese classes from
global.asa.

// Dennis
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Members online

Forum statistics

Threads
473,767
Messages
2,569,572
Members
45,046
Latest member
Gavizuho

Latest Threads

Top