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

后端 未结 8 2031
忘掉有多难
忘掉有多难 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:43

    Not an answer to your question but one of your assumptions is incorrect.

    Session IDs can be passed in the URL. Session does not require cookies.

    http://msdn.microsoft.com/en-us/library/aa479314.aspx

    <sessionState cookieless="true" />
    
    0 讨论(0)
  • 2020-12-23 18:47

    For example when your application might be running in a computer farm and you can't configure session to use sql server.( Or using sql server is too much of a performance hit)

    0 讨论(0)
提交回复
热议问题