473,401 Members | 2,139 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

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

Global.asa and including custom asp class?

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?") %>
--------------------
Jul 19 '05 #1
2 1883
Personally, I would open and close per page as needed.
'from dlbjr

'Unambit from meager knowledge of inane others,engender uncharted sagacity.
Jul 19 '05 #2
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
"dlbjr" <oo**@iforgot.com> skrev i meddelandet
news:uO*************@TK2MSFTNGP09.phx.gbl...
Personally, I would open and close per page as needed.
'from dlbjr

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

Jul 19 '05 #3

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

Similar topics

17
by: MLH | last post by:
A97 Topic: If there is a way to preserve the values assigned to global variables when an untrapped runtime error occurs? I don't think there is, but I thought I'd ask. During development, I'm...
33
by: MLH | last post by:
I've read some posts indicating that having tons of GV's in an Access app is a bad idea. Personally, I love GVs and I use them (possibly abuse them) all the time for everything imaginable - have...
2
by: Ron | last post by:
I need to write a custom textbox control that references an object located in the Global.asax class, but I can't compile the control into a DLL without including the reference to the project DLL...
3
by: Joe Reazor | last post by:
I understand how Web.Config inheritance works between a parent application and sub applications under the parent. But what I was wondering was if there was a similar way to do the same thing for...
15
by: randyr | last post by:
I am developing an asp.net app based on a previous asp application. in the asp applications global.asa file I had several <object id="id" runat="server" scope="scope" class="comclass"> tags for...
7
by: Adam | last post by:
Im trying to add an httphandler for all *.sgf file extensions. I have developed the handler, 1. installed it into the gac 2. added it to the machine.config: <httpHandlers> <add verb="*"...
4
by: JohnR | last post by:
My situation is that I have a custom user control that I have built into a DLL and put it on the "USER CONTROLS" part of the toolbox, so I can drag it into a form whenever I need it. The problem...
1
by: Stu | last post by:
Hi, Im using vis studio 2003 and I think wse is out of the question as clients could be using java which doesnt support it. So I managed to find some code which allows you to develop a custom...
7
by: Jason Kester | last post by:
Best I can tell, there are three basic ways you can deal with global error handling in ASP.NET. Namely: 1. Derive all your pages from a custom Page class, and override OnError() 2. Specify a...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

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.