context by itself is cannot hold any values.. you need to store it either
cache or application or session
if the data is to be shared between users then Cache is the best place
Application object used to be the place to store application wide variables
but if its gets overloaded then the aspnet process is bounced.
This is where Cache object comes into picture.. it will release the unused
items (based on priority) to make space for new objects being added if it is
running out of space.
if the data is to be shared between pages but only specific to a user then
session object is the place
--
Regards,
Hermit Dave
(
http://hdave.blogspot.com)
"Mike" <no****@nospam.com> wrote in message
news:eh**************@TK2MSFTNGP12.phx.gbl...
Hi,
I have an ASP.NET solution in which I need to store some information, such
as DB user and password. So far, I have used the Context object to share
information between the various pages, but I after having read some
material, I have had the impression that the Cache object is better, since
my variables are used throughout the entire application. Is that correct? If
not, what is the best method for storing application variable (used
throughout the application)?
Thanks.
Mike