What Is The Difference Between ViewState and SessionState?

Answer Posted / pooooo

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 user. It is used to maintain the user's illusion that the page remembers what he did on it the last time - dont give him a clean page every time he posts back.

Is This Answer Correct ?    8 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is assembly c#?

559


What is marshalling in c#?

556


Define a manifest in .net?

661


What are modifiers in c#?

553


Why do we need generics in c#?

588






What is singleordefault?

599


Is constructor a static method?

598


Can we override interface method?

621


What is difference between iqueryable and ienumerable in c#?

530


What can be done with c#?

527


What is the purpose of private constructor in c#?

650


Which is more efficient for loop or while loop?

536


What is difference between array and list?

577


Ho we can see assembly information?

596


What is a scope in c#?

565