开发者

.NET session state variables

开发者 https://www.devze.com 2023-02-02 11:29 出处:网络
Is there any special means to store the controls in the Sessions? I was trying to store panel control with couple of text boxes in it. For some reason when I extract the Panel back from Session, It sh

Is there any special means to store the controls in the Sessions? I was trying to store panel control with couple of text boxes in it. For some reason when I extract the Panel back from Session, It shows empty -( wondering wha开发者_StackOverflow社区ts going on with Panel?

BTW, whats the best way to debug the ASPX script( not C# coding) ?


Read the ASP.NET Page Lifecycle Overview to see why controls can't be stored in session. Pages are very short-lived, and when they are disposed, so are their controls. Trying to access them after disposal will lead to errors.

You should be storing just the data in your session variables, not the controls themselves.

0

精彩评论

暂无评论...
验证码 换一张
取 消