Ask a Question related to ASP.NET General, Design and Development.
-
John #1
Back Button and code execution
Hi,
I have a web form accounting app. In certain instances it
causes trouble if the user clicks the Back button. I've
read several posts that indicate that it is not
recommended (or even possible) to try to disable the Back
button. So, what I did was save a session variable with
the name of the current webform and then check this
session variable on page load to make sure the user was
not coming from a page that was not acceptable.
This works when I navigate to the page by typing in a URL
but is seems like when I click the Back button to go to a
page I should not go back to, the code behind is not
executed. Is there some way to force this to always be
executed?
Thanks,
John Ritchie
John Guest
-
Pausing Code Execution
I want to create an Alert/Message box in Flash MX. I want to be able to do something like this: var retval = message("Save File Before... -
Execution code run backward
Hi, I've never seen similar problem before. Application_AuthenticateRequest in Global.asax.vb file execute 4 time before it exit to the default.vb... -
Can't execute code from a freed script on BACK button
I've got a series of ASP pages that display data. The pages pass variables forward via QueryString. Strange thing I'm finding is that if I get a few... -
execution of script from button
Hi all: I am a newbie in terms of PERL. Here's what i want to do. I ahve a HTML page that has a button on it. I want a user to click on that... -
PERL code execution rule?
I was under the impression that "subroutines" are only executed IF they're called. But, it looks like subroutines will execute on there own if they... -
Marina #2
Re: Back Button and code execution
The problem is that the browser loads a cached version of the page - so it
doesn't go to the server at all.
You can try to set the expiration of the page to expire immediately, but I'm
not sure how well that works.
"John" <jcronline@dashgroup.com> wrote in message
news:0c9f01c356af$c86f51b0$a601280a@phx.gbl...> Hi,
>
> I have a web form accounting app. In certain instances it
> causes trouble if the user clicks the Back button. I've
> read several posts that indicate that it is not
> recommended (or even possible) to try to disable the Back
> button. So, what I did was save a session variable with
> the name of the current webform and then check this
> session variable on page load to make sure the user was
> not coming from a page that was not acceptable.
>
> This works when I navigate to the page by typing in a URL
> but is seems like when I click the Back button to go to a
> page I should not go back to, the code behind is not
> executed. Is there some way to force this to always be
> executed?
>
> Thanks,
> John Ritchie
Marina Guest
-
Yan-Hong Huang[MSFT] #3
RE: Back Button and code execution
Hello John,
Marina is right. Preventing it from caching may resolve this issue.
Besides, In order to prohibit a page from caching, you could also place following Meta tag in the head of the html.
<META HTTP-EQUIV="Pragma" CONTENT="no-cache">
Hope that helps.
Best regards,
Yanhong Huang
Microsoft Online Partner Support
Get Secure! - [url]www.microsoft.com/security[/url]
This posting is provided "AS IS" with no warranties, and confers no rights.
--------------------
!Content-Class: urn:content-classes:message
!From: "John" <jcronline@dashgroup.com>
!Sender: "John" <jcronline@dashgroup.com>
!Subject: Back Button and code execution
!Date: Wed, 30 Jul 2003 08:32:27 -0700
!Lines: 19
!Message-ID: <0c9f01c356af$c86f51b0$a601280a@phx.gbl>
!MIME-Version: 1.0
!Content-Type: text/plain;
! charset="iso-8859-1"
!Content-Transfer-Encoding: 7bit
!X-Newsreader: Microsoft CDO for Windows 2000
!X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4910.0300
!Thread-Index: AcNWr8hsqj5nJmscRzCveBt3X2bLyg==
!Newsgroups: microsoft.public.dotnet.framework.aspnet
!Path: cpmsftngxa06.phx.gbl
!Xref: cpmsftngxa06.phx.gbl microsoft.public.dotnet.framework.aspnet:163398
!NNTP-Posting-Host: TK2MSFTNGXA14 10.40.1.166
!X-Tomcat-NG: microsoft.public.dotnet.framework.aspnet
!
!Hi,
!
!I have a web form accounting app. In certain instances it
!causes trouble if the user clicks the Back button. I've
!read several posts that indicate that it is not
!recommended (or even possible) to try to disable the Back
!button. So, what I did was save a session variable with
!the name of the current webform and then check this
!session variable on page load to make sure the user was
!not coming from a page that was not acceptable.
!
!This works when I navigate to the page by typing in a URL
!but is seems like when I click the Back button to go to a
!page I should not go back to, the code behind is not
!executed. Is there some way to force this to always be
!executed?
!
!Thanks,
!John Ritchie
!
Yan-Hong Huang[MSFT] Guest
-
Maxime #4
Back Button and code execution
Hi,
I have the same problème and the "meta" do not seems work.
If i refresh or i try in an other tab, it work. But with the back button i got a cache.
Thanks.Maxime Guest
-
Maxime #5
Back Button and code execution
Re,
http://stackoverflow.com/questions/49547/making-sure-a-web-page-is-not-cached-across-all-browsers
Here I found this solution with php :
header('Cache-Control: no-cache, no-store, must-revalidate');
header('Pragma: no-cache');
header('Expires: 0');
the same in plain html work only with IE:
<meta http-equiv="Cache-Control" content="no-cache, no-store, must-revalidate">
<meta http-equiv="Pragma" content="no-cache">
<meta http-equiv="Expires" content="0">Maxime Guest



Reply With Quote

