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.
精彩评论