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

Explain constructor?

6 Answers   Wipro,


What is routing in c#?

0 Answers  


What is Garbage Collection in .Net?

0 Answers  


class Program { void add() { int x=10, y=20; fun(); Console.WriteLine("{0}", sum); } void fun() { int sum; sum = x + y; } static void Main(string[] args) { Program f =new Program(); f.add(); } } Debug above program.....

3 Answers   HCL,


What is the use of list in c#?

0 Answers  






what is the difference between finally and dispose methods?

3 Answers   HCL, Patni,


Can you store multiple data types in System.Array?

20 Answers   Satyam, Siebel Systems,


What is the difference between method parameters and method arguments. Give an example?

0 Answers  


What do you mean by synchronous and asynchronous operations?

0 Answers  


List out the differences between array and arraylist in c#?

0 Answers  


What are indexers in c# .net?

0 Answers  


1. What is lazy loading? 2. What is delay signing? 3. How to transfer view object to presenter in MVP? 4. How to create a generic class? 5. What is Ajax object? 6. What is explicit interface implementation? 7. I1, I2 interfaces have same methods (say PrintName) explicitly implemented in class C1. Now how to call PrintName method from I1? 8. I have a list of Customers. List the customer with maximum orders using LINQ.

1 Answers   Aptron, Volvo,


Categories