Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > Global variables on par with ASP's global.asa

Reply
Thread Tools

Global variables on par with ASP's global.asa

 
 
Wayne
Guest
Posts: n/a
 
      11-05-2003
I have googled etc for details on using global variables in the global.asax
file in much the same manour as that in global.asa, and have come across
some sites suggesting the use of:
<object id='id' runat='server' classid='Namespace.Class'
scope='Application'/>

However, nothing happens, and when used in the context of the current
application it just returns "Object not Defined".

I have looked at the HttpApplicationState class, but the level of
information returned by the object that I need global actually complicates
the use if HAS.


 
Reply With Quote
 
 
 
 
charles
Guest
Posts: n/a
 
      11-05-2003
Just say Application["myVariable"] = someObject. (and cast it to get it
back).

The <object... > mechanism you tried also uses the HttpApplicationState
object but seems more complex

charles


"Wayne" <none@none> wrote in message
news:%(E-Mail Removed)...
> I have googled etc for details on using global variables in the

global.asax
> file in much the same manour as that in global.asa, and have come across
> some sites suggesting the use of:
> <object id='id' runat='server' classid='Namespace.Class'
> scope='Application'/>
>
> However, nothing happens, and when used in the context of the current
> application it just returns "Object not Defined".
>
> I have looked at the HttpApplicationState class, but the level of
> information returned by the object that I need global actually complicates
> the use if HAS.
>
>



 
Reply With Quote
 
 
 
 
Wayne
Guest
Posts: n/a
 
      11-11-2003
"charles" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> Just say Application["myVariable"] = someObject. (and cast it to get it
> back).
>
> The <object... > mechanism you tried also uses the HttpApplicationState
> object but seems more complex
>
> charles


That is what I feared - but it does work very well; even to the point I can
access that Object's members et-al.

Thanks


 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Can't find par loader at C:/Perl/site/lib/PAR/Packer.pm line 101 Oliver Soeder Perl Misc 1 06-30-2007 02:32 PM
Can't find par loader at C:/Perl/site/lib/PAR/Packer.pm line 101. osoeder@gmx.de Perl Misc 0 06-07-2007 02:58 PM
PAR, PAR::Packer smueller@cpan.org Perl Misc 1 12-01-2006 09:41 PM
FWSM/PIX and Dynamic PAT using global IP range vs. global interface vs. global IP Hoffa Cisco 0 10-25-2006 01:04 PM
message eradique par une regle emise par SPE interscaneManager@fr.ch Python 0 08-21-2003 07:47 PM



Advertisments