Keeping ViewState in SessionPageStatePersister

后端 未结 4 1440
情书的邮戳
情书的邮戳 2020-12-16 01:52

I want to keep viewstate of a specific page in session but following code block does not help me, what might I be missing?

So here is the code-behind file content of

4条回答
  •  没有蜡笔的小新
    2020-12-16 02:13

    What you might be seeing in the ViewState hidden field is the ControlState which is stored differently from the "normal" ViewState.

    To also store the ControlState in session, add the following entry to the web.config file:

      
        
          
            RequiresControlStateInSession=true
          
        
      
    

    Check this page for more.

提交回复
热议问题