Groups | Blog | Home
all groups > asp.net caching > november 2005 >

asp.net caching : Saving a variable



euan NO[at]SPAM madprops.org
11/11/2005 5:56:13 PM
I use session. There are some good video tutes over here
(http://msdn.microsoft.com/vstudio/express/vwd/learning/default.aspx)
about session state etc. Definately watch those vids though, they talk
about all sorts of variable states and uses.

Oh its lesson 4 btw.
Andrew Chalk
11/11/2005 7:43:49 PM
One page of my ASP.NET application constructs a string variable that is used
in other pages. How should I store the string across pages? I am using the
Session object. Is this the right use for it?

Many thanks.

David Barkol
11/11/2005 8:29:18 PM
Andrew,

The correct answer depends on the context in which you plan to use that
variable. If it's something specific to the user then you can use the
Session object or even pass it around in a query string. If it's
something that you would like to share across all users then you can
use the Cache or maybe the Application object. Here is a good article
to read: http://aspnet.4guysfromrolla.com/articles/020205-1.aspx

David Barkol
www.neudesic.com
Daniel Walzenbach
12/1/2005 10:59:47 PM
Andrew,

I agree with David. Have a look at
http://www.msdn.microsoft.com/asp.net/archive/default.aspx?pull=/library/en-us/dnpag/html/scalenetchapt06.asp

This article should provide you with all you need to know to answer your
question!

Regards

Daniel

"Andrew Chalk" <achalk@magnacartasoftware.com> schrieb im Newsbeitrag
news:%23kMcKqy5FHA.2628@TK2MSFTNGP11.phx.gbl...
[quoted text, click to view]

Andrew Chalk
12/3/2005 6:16:13 PM
Thanks to all who replied. Your responses were very helpful. I am now using
the Session object.

Regards,

Andrew
[quoted text, click to view]

AddThis Social Bookmark Button