views:

125

answers:

2

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.

A: 

Have you tried with removing temporary files and restarting browser. Your page might be cached in browser.

Manoj
Thank for you input, but I think it's not related to browser caching.
White_Sox
+2  A: 

Have you tried setting the client side to not cache pages - stick this in your page load:

Response.Cache.SetCacheability(HttpCacheing.NoCache)

(Think the syntax might be slightly off, but you should be able to figure it out)

Paddy
I did try it, but had no success. I think it's not related to browser caching. Thank you for your input.
White_Sox