What do you do when you can't use ViewState?

后端 未结 7 1789
长发绾君心
长发绾君心 2021-02-09 06:43

I have a rather complex page that dynamically builds user controls inside of a repeater. This repeater must be bound during the Init page event before ViewState is

7条回答
  •  既然无缘
    2021-02-09 07:34

    This also has issues, because I have to explicitly null the session value during non postbacks in order to emulate how ViewState works.

    Why do you have to explicitly null out the value (aside from memory management, etc)? Is it not an option to check Page.IsPostback, and either do something with the Session variable or not?

提交回复
热议问题