Tuesday, 21 December 2010

Difference between ViewState and Session

ViewState persist the values of controls of particular page in the client (browser) when post back operation done. When user requests another page previous page data no longer available.

SessionState persist the data of particular user in the server. This data available till user close the browser or session time completes.

View state & Session state are objects which are used for maintaining a state.

.View state maintains a state in a single page.if we go to another page the state will be lossed.
. Session state we can maintain a state as long as browser opened or session time expired.

No comments:

Post a Comment