Why would you ever use asp.net's ViewState storage object over the Session storage object?

后端 未结 8 2071
忘掉有多难
忘掉有多难 2020-12-23 17:55

Other than because session storage is session-global to more than one page, why would you ever want to use the viewstate to hold values?

It seems kind of ridiculous

8条回答
  •  攒了一身酷
    2020-12-23 18:29

    Sessions run out, Viewstate does not - you can go back an hour later and your viewstate will still be available. Viewstate is also consistently available when you go back/forward on the website, Session changes.

提交回复
热议问题