Prevent postback saved into history of Internet Explorer

S

Simon

Hi, I need to prevent Internet Explorer to save the page in history
collection when it is in PostBack.
To try do this I have put this code:

protected override void OnLoad( EventArgs evt)
{
if (IsPostBack)
Response.Cache.SetNoStore();
.....
base.OnLoad( evt);
}

With above code, when I press the back button the internet explore return
"The page cannot be displayed" because the IE don't save the page into the
history I think, but I need to prevent the IE history collection change, so
when I press the back button IE display the page loaded not in postback (the
first time that the page was loaded).
Is possible to do this ?

Thanks in advance.

Simon.
 
S

Simon

Hi Saravana

I try to do like wrote into the site, but when I push the back button
Internet Explorer display "The page cannot be displayed" and I don' t want
that this happens.

Thanks.

Simon
 
J

Joerg Jooss

Simon said:
Hi Saravana

I try to do like wrote into the site, but when I push the back button
Internet Explorer display "The page cannot be displayed" and I don' t
want that this happens.

That's a browser specific warning you can only prevent if you follow
the Post-Redirect-Get pattern (with caching disabled).


Cheers,
 

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

Forum statistics

Threads
473,766
Messages
2,569,569
Members
45,042
Latest member
icassiem

Latest Threads

Top