view state
hi this is kavita
I simply want persist 5-8 variable value on same page which viewstate management techineque is best in this situation.
viewstate,cookies,cache,session etc
please give me suggestion.
Know the answer? Post it — somebody with the same question will find it here.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
Mike GoldPosted Jul 27, 2007, 7:11 PM
Session["var1"] = 50; // for example
Sessions has an advantage over Caching in that you can use it on web farms because they support single point storage and can be configured to store in a sql server database.
Caching stores at the application level and is similar to the Application store. Each item can be accessed by multiple users across multiple sessions.
Cache takes advantage of concepts such as scavenging, and sliding expiration which tries to keep the most actively used data in memory. If you want better performance for lots of data, I would use caching.
So the decision you need to make is if the 5 variables are only persistent per browser session use the Session state otherwise if it needs to persist for everyone as long as the application is running, use the Application state.