What Is The Difference Between ViewState and SessionState?



What Is The Difference Between ViewState and SessionState?..

Answer / 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

More C Sharp Interview Questions

Is a decimal an integer?

0 Answers  


Does unity use c++ or c#?

0 Answers  


State whether it is true to test a Web service you must create a windows application or Web application to consume this service or not?

0 Answers   Siebel,


can you allow a class to be inherited, but prevent the method from being over-ridden?

0 Answers   Siebel Systems,


What is difference between asp net and c# net?

0 Answers  






Can we inherit sealed class in c#?

0 Answers  


what is default accessibility for a class? what is difference b/w viewstate and controlstate? what is the default access specifier for a top level class which are not nested into other classes?

2 Answers  


What does xpath return?

0 Answers  


Why do we need events in c#?

0 Answers  


Why do we use class in c#?

0 Answers  


Can we inherit an interface in an abstract class?

6 Answers   HCL,


What is lock in c#?

0 Answers  


Categories