.NET/ASP.NET Interview Question -Difference between SessionState and ViewState?

 Posted by ArticlesMaint on 4/11/2011 | Category: ASP.NET Interview questions | Views: 6550

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.


Asked In: Many Interviews | Alert Moderator 

Comments or Responses

Login to post response