473,395 Members | 1,403 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,395 software developers and data experts.

Prevent postback saved into history of Internet Explorer

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.
Nov 19 '05 #1
3 4119
Check out this faq,
http://www.extremeexperts.com/Net/FA...ackButton.aspx

--
Saravana
http://dotnetjunkies.com/WebLog/saravana/
www.ExtremeExperts.com
"Simon" <simon> wrote in message
news:eH**************@TK2MSFTNGP10.phx.gbl...
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.

Nov 19 '05 #2
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
"Saravana" <sa******@sct.co.in> wrote in message
news:ud*****************@news.cpqcorp.net...
Check out this faq,
http://www.extremeexperts.com/Net/FA...ackButton.aspx

--
Saravana
http://dotnetjunkies.com/WebLog/saravana/
www.ExtremeExperts.com
"Simon" <simon> wrote in message
news:eH**************@TK2MSFTNGP10.phx.gbl...
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.


Nov 19 '05 #3
Simon wrote:
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,
--
http://www.joergjooss.de
mailto:ne********@joergjooss.de
Nov 19 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

15
by: Peter Bremer | last post by:
Hi all, I've written this little piece of code, which doesn't seem to work in Mozilla 1.5. I haven't tried it on other Gecko browsers, but I've found some indication that Netscape 6+ has the...
0
by: Mark Petersen | last post by:
Is there a way to prevent a page postback from being added to the browser history without using SmartNavigation? I'd like to be able to do this in a cross-browser compatible way (modern...
3
by: Rob | last post by:
Each time a webform is posted back (submitted), another URL is added to the browser's history list. My web application allows a back button to return to previously visited pages, but I do not wish...
2
by: Bruce W.1 | last post by:
There's something I can't figure out. I added some javascript behavior to my datagrid, just like in this article, except in C# instead of VB: ...
0
by: Itai | last post by:
How does smartNavigation prevent Postback URL's from being added to the browser History?
2
by: Ted | last post by:
is there an example of how one would go about selectively deleting items in IE's history based on URL names using VB.NET? i have checked every resource i know and come up short.
5
by: namemattersnot | last post by:
I have a SAJAX login authentication script that, if the the correct password is provided, returns "history.go(0)" to the page and I then use "eval()" on the returned data to refresh it. If the...
0
by: =?Utf-8?B?bWtlbGx5NGNh?= | last post by:
I've spent quite some time searching for a way to prevent the browser from adding each of my postbacks to the History list, and have found several different methods to do that or something similar,...
2
by: pavanip | last post by:
Hi, I am using the following code to get Internet Explorer filepath to display history list. filePath1 = Environment.GetFolderPath(Environment.SpecialFolder.History) by using the above path i...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.