开发者

.NET session state variables

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

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜