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 wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Global Classes

Status
Not open for further replies.

tschonken

Programmer
Jul 3, 2002
21
ZA
Is there any way to declare a global class or function in asp? Almost like a session or application variable that can be accessed from anywhere?
 
Create your class or variable with a &quot;public&quot; modifier in a file called (for exemple) &quot;globals.asp&quot; (the first chars of this file must be &quot;<%&quot; and the last ones must be &quot;%>&quot;). Then in all your asp files, add this line :
Code:
<!-- #include file=&quot;globals.asp&quot; -->

Note you can also declare global constants (keyword &quot;const&quot;) this way.
Water is not bad as long as it stays out human body ;-)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top