GeekInterview.com
  I am new, Sign me up!
 
GeekInterview.com  >  Interview Questions  >  Microsoft  >  ASP.NET 2.0
Go To First  |  Previous Question  |  Next Question 
 ASP.NET 2.0  |  Question 128 of 161    Print  
What is the difference between View State, Session State and Hidden Variables?
In which scenario we use each of them?

  
Total Answers and Comments: 3 Last Update: April 13, 2009     Asked by: hsarvani 
  
 Sponsored Links

 
 Best Rated Answer

No best answer available. Please pick the good answer available or submit your answer.
September 26, 2007 13:18:54   #1  
jayareddy12 Member Since: September 2007   Contribution: 2    

RE: What is the difference between View State, Session...
Hidden Files contain information that is not visible on the page but is posted to the server along with a page post back While View State is the mechanism that asp.net uses to maintain the state of controls across page post backs.
  • HiddenFiles are used for pages that post to themselves or to other pages while View State works only when a page posts back to itself.
  • Hidden Files does not support for storing structured values while View State support for structured values.
    Whereas Session values are available only for the duration of current browser Session only.

  •  
    Is this answer useful? Yes | No
    December 09, 2008 02:08:59   #2  
    subhankarbiet Member Since: March 2008   Contribution: 1    

    RE: What is the difference between View State, Session State and Hidden Variables?In which scenario we use each of them?
    View state variables stores the value for a single page it a client side browser session is a server side variables. It stores the value for the full project.
     
    Is this answer useful? Yes | No
    April 13, 2009 03:37:39   #3  
    sharath R chandra Member Since: April 2009   Contribution: 3    

    RE: What is the difference between View State, Session State and Hidden Variables?In which scenario we use each of them?
    View state is stored on page(base 64 encoded). In addition a hash is created using MAC key which is added to view state data and resulting string is stored on page.

    Hidden variables doesn't render visibly in browser but its properties can be set. When page is submitted to server contents of hidden field is sent in http form

    Session state is a server based state management. It can be accessible from all pages in web application. It is scoped to current browser session only. It's structured as a key/value dictionary for storing session specific info that needs to be maintained between server round trips.

     
    Is this answer useful? Yes | No


     
    Go To Top


     Sponsored Links

     
    About Us -  Privacy Policy -  Terms and Conditions -  Contact -  Ask Question -  Propose Category -  Site Updates 

    Copyright © 2005 - 2009 GeekInterview.com. All Rights Reserved

    Page copy protected against web site content infringement by Copyscape