Its because the page is not cached on the client but is retrieved every
time you make a request (including when you press the back button). The
lines
<% Response.CacheControl = "no-cache" %>
<% Response.AddHeader( "Pragma", "no-cache" ) %>
<% Response.Expires = -1 %>
are doing just that. If you remove them the page will be cached and the
browser will ask you when pressing the back button and the previous page
was obtained by a post.
Sorry i wasn't somebody else
in*******@hotmail.com wrote:
But that's what I do.
Anybody else can help?
Thx
bloomfield <bl********@as.ro> wrote in message news:<#9**************@tk2msftngp13.phx.gbl>...
The message is displayed only if the page was obtained with a 'post'
method. To view this do the fallowing: from page A do a post (submit) to
the page A. After that go to page B and press back.
in*******@hotmail.com wrote:
<%@ Page Language="vb" AutoEventWireup="false"
Codebehind="pagexxx.aspx.vb" Inherits="pagexxx"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<!-- #include virtual="/CommonUI/Include/Headers.htm" -->
<HTML>
<HEAD>
....
"/CommonUI/Include/Headers.htm" has these contents:
<% Response.CacheControl = "no-cache" %>
<% Response.AddHeader( "Pragma", "no-cache" ) %>
<% Response.Expires = -1 %>
With IE, I go to page A and then to page B. Then I press back and page
A is refetched from the webserver. What I want instead, is to display
the following message to the user:
"Warning: Page has Expired"
It used to work in the past with my application , but not any more.
Anobody knows what may be wrong and how I can fix it ?
Thanx