Tag: Session


Session vs Viewstate in ASP.NET

What is the difference between SessionState and ViewState in ASP.NET?

If you asked this question to me, the main difference is a session known in a every page in all application and viewstate just only in a page. To know more about Understanding ASP.NET View State just read here . In stackoverflow, some people give their answer like this:

Session State contains information that is pertaining to a specific session (by a particular client/browser/machine) with the server. It’s a way to track what the user is doing on the site.. across multiple pages…amid the statelessness of the Web. e.g. the contents of a particular user’s shopping cart is session data. Cookies can be used for session state.
View State on the other hand is information specific to particular web page. It is stored in a hidden field so that it isn’t visible to the …