Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Can I use <OBJECT> for own classes?

Status
Not open for further replies.

DROFNUD

MIS
Oct 16, 2001
40
GB
If I have defined a class in an ASP file, can I reference it as an object in my Global.asa?

eg.
I want a page class to be accessable anywhere without including it.

I usually do
Code:
<!--#include file=&quot;clsPage.asp&quot;-->
in each page, and
Code:
oPage = new clsPage
to create the object, but this particular class has to go to the database each time to initialise. If I could set up this class as an object in the Global.asa it would initialise just once.

I want to be able to do something like this... (but this doesn't work).

In GLOBAL.ASA
Code:
<object runat=&quot;server&quot; scope=&quot;application&quot; id=&quot;clsCust&quot;
progid=&quot;clsCust.ASP&quot;>

Is my syntax wrong? or can you just not do this?

ASP3.0 by the way...

Si...
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top