top button
Flag Notify
    Connect to us
      Site Registration

Site Registration

What is the difference between ViewState and SessionState in context of JavaScript?

+1 vote
459 views
What is the difference between ViewState and SessionState in context of JavaScript?
posted Aug 9, 2017 by anonymous

Share this question
Facebook Share Button Twitter Share Button LinkedIn Share Button

1 Answer

0 votes
  • The values of controls of a particular page of the client browser is persisted by ViewState at the time of post back operation is done. If the user requests another page, the data of previous page is no longer available.

  • The data of a particular server persists in the server by SessionState. The availability of the user data is up to the completion of a session or closure of the browser.

Difference between SessionState and ViewState

  • A ViewState is a state of a page within a browser wherein the values of controls persist when post back operation is done.
    When another page is loaded, the previous page data is no longer available.

  • SessionState is the data of a user session and is maintained on the server side. This data available until user closes the browser or session time-outs.

answer Sep 26, 2017 by Manikandan J
...