Shivprasad Koirala
.NET/ASP.NET Interview Question - Elaborate differentiation between ViewState and SessionState?
By Shivprasad Koirala in ASP.NET on Apr 12 2011
  • Pramod Verma
    Feb, 2015 10

    For Maintaining State we use. Viewstate is page level maintain the state. Viewstate's data is store in hidden html control in intercepted format.Session use through out the page. different users has different session id. session data stores in web server. Session ID store in cookies, If cookies is disable then attach with url.

    • 0
  • Shivprasad Koirala
    Apr, 2011 12

    Answer:

    SessionState and ViewState are used to store data value when an respective postback occurs.

    SessionState is used to store Value till the user end's the session.
    ViewState is used to store Value for the current page only and when we switch to other page the data value of the previous page is lost.

    Session is Server type storage whereas View is a client type storage.

    Session provide higher security as compared to View as the data value is stored on server side.

     

    Regards,

    Please click here to see more .NET/ASP.NET interview questions

    • 0


Most Popular Job Functions


MOST LIKED QUESTIONS