Dynamic web user control problem when browser's back button is clicked.

Posted by White_Sox on Stack Overflow See other posts from Stack Overflow or by White_Sox
Published on 2010-03-30T10:10:02Z Indexed on 2010/03/30 10:13 UTC
Read the original article Hit count: 344

Hi all,

I have an .aspx page in which I dynamically add web controls to a panel. The problem is when I hit the browser's back buton, it's displayed a version of the page that no longer exists on the server-side, because the controls are dynamically added. Let's say my aspx dynamically adds Control1. From there, I click a button that loads Control2. At this moment, if I press the browser's back button, it will display the page with Control1, but Control1 no longer exists on the server-side, so if I interact with it, some erractic behaviour will occur. Any ideas on this?

Thank you very much.

© Stack Overflow or respective owner

Related posts about ASP.NET

Related posts about usercontrols