T
Tom wilson
I can't believe this is such an impossibility...
I have an asp.net page. It accepts data through on form fields and
includes a submit button. The page loads up and you fill out some
stuff. The submit button posts the page back to the server. The
button code detects an entry error and sends the page back to the
user. This all works.
However, if the user presses the Back button at this point, we go back
and all the form values are cleared. I've been all over the web
searching for a solution and all I can find is to either disable the
back button or clear the history so Back won't go back.
I can't get either of these to work either. I've tried adding the
javascript to the top of the body of the page:
<%
Response.Buffer = True
Response.ExpiresAbsolute = DateTime.Now.AddDays(-1)
Response.Expires = 0
Response.CacheControl = "no-cache"
%>
I've tried adding this to the Page_Load event:
Response.Cache.SetCacheability(HttpCacheability.NoCache)
Yet I can still use the back button to go back to a blank page.
What's the solution to this problem?
Thanks!
I have an asp.net page. It accepts data through on form fields and
includes a submit button. The page loads up and you fill out some
stuff. The submit button posts the page back to the server. The
button code detects an entry error and sends the page back to the
user. This all works.
However, if the user presses the Back button at this point, we go back
and all the form values are cleared. I've been all over the web
searching for a solution and all I can find is to either disable the
back button or clear the history so Back won't go back.
I can't get either of these to work either. I've tried adding the
javascript to the top of the body of the page:
<%
Response.Buffer = True
Response.ExpiresAbsolute = DateTime.Now.AddDays(-1)
Response.Expires = 0
Response.CacheControl = "no-cache"
%>
I've tried adding this to the Page_Load event:
Response.Cache.SetCacheability(HttpCacheability.NoCache)
Yet I can still use the back button to go back to a blank page.
What's the solution to this problem?
Thanks!