J
Jeff C
Hello everyone.
If I hit the back button on my data entry form I can still get the
cached page. I have tried
<%
pStr = "private, no-cache, must-revalidate"
Response.ExpiresAbsolute = #2000-01-01#
Response.AddHeader "pragma", "no-cache"
Response.AddHeader "cache-control", pStr
%>
and
Response.Buffer = True
Response.ExpiresAbsolute = Now().Subtract(New TimeSpan(1, 0, 0,
0))
Response.Expires = 0
Response.CacheControl = "no-cache"
Response.Cache.SetCacheability(HttpCacheability.NoCache)
but nothing seems to work. I really need help on this. It's a data
entry form and I can't have them have the ability to use the back
button and get data.
Here is my page load in codebehind
____
Private Sub Page_Load(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles MyBase.Load
Response.Cache.SetCacheability(HttpCacheability.NoCache)
cmdClearSearch.Attributes.Add("onclick", "return confirm('This
will clear all search criteria, continue?')")
PopulateForm()
End Sub
____
Here is my .aspx page stuff
<%@ Page language="VB" AutoEventWireup="false"
Codebehind="FirstSave.aspx.vb" Inherits="myapp.myapp"%>
<%@ Register TagPrefix="myapp" TagName="bar" Src="bar.ascx" %>
<% System.Web.HttpContext.Current.Response.AddHeader("Cache-Control","no-cache")
System.Web.HttpContext.Current.Response.Expires = 0
System.Web.HttpContext.Current.Response.Cache.SetNoStore()
System.Web.HttpContext.Current.Response.AddHeader("Pragma",
"no-cache")%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML> (etc...)
Please help!
Thanks much!
If I hit the back button on my data entry form I can still get the
cached page. I have tried
<%
pStr = "private, no-cache, must-revalidate"
Response.ExpiresAbsolute = #2000-01-01#
Response.AddHeader "pragma", "no-cache"
Response.AddHeader "cache-control", pStr
%>
and
Response.Buffer = True
Response.ExpiresAbsolute = Now().Subtract(New TimeSpan(1, 0, 0,
0))
Response.Expires = 0
Response.CacheControl = "no-cache"
Response.Cache.SetCacheability(HttpCacheability.NoCache)
but nothing seems to work. I really need help on this. It's a data
entry form and I can't have them have the ability to use the back
button and get data.
Here is my page load in codebehind
____
Private Sub Page_Load(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles MyBase.Load
Response.Cache.SetCacheability(HttpCacheability.NoCache)
cmdClearSearch.Attributes.Add("onclick", "return confirm('This
will clear all search criteria, continue?')")
PopulateForm()
End Sub
____
Here is my .aspx page stuff
<%@ Page language="VB" AutoEventWireup="false"
Codebehind="FirstSave.aspx.vb" Inherits="myapp.myapp"%>
<%@ Register TagPrefix="myapp" TagName="bar" Src="bar.ascx" %>
<% System.Web.HttpContext.Current.Response.AddHeader("Cache-Control","no-cache")
System.Web.HttpContext.Current.Response.Expires = 0
System.Web.HttpContext.Current.Response.Cache.SetNoStore()
System.Web.HttpContext.Current.Response.AddHeader("Pragma",
"no-cache")%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML> (etc...)
Please help!
Thanks much!