manual rendering of control on postback?

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi everyone!

I have a user control (not ascx though - rendered when the page loads),
actually it's a basket control on a master page.

This master page includes a wizard page too,
however when the user clicks next to navigate to another page (e.g. page2),
I remove the basket's contents,
but, if he presses the back button,
he will see the basket full, even if the basket is empty,
because the basket isn't rendered again (postback on page1)!

So, how can I make this control render again, manually somehow?

Thanks in advance!
 
Patrick,
A tisket, a tasket. A dynamically rendered control needs to be re-created
when there is a postback. If they press the back button and it still shows up
with what was on the original page, then you need to address cachine
directives that will tell the browser NOT to cache the page. This would make
the brower re-request the page when you press the "back" button. There could
be other issues too, but that would be where I'd start.
Peter
 
Ok, I understand,
but what do you suggest,

leave it as is,
looking not empty,
while it is empty instead?

Some guy in another forum suggested that I use:

put the following code in the PreRender handler

Response.CacheControl = "no-cache";

Response.Expires = -1;

This is a bad idea?
 
Back
Top