manual rendering of control on postback?

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!
 
G

Guest

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
 
G

Guest

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?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,995
Messages
2,570,236
Members
46,825
Latest member
VernonQuy6

Latest Threads

Top