Expire Page Doesn't?

W

Wayne Wengert

I have an aspx page where, after the user clicks on a button to submit the
changes, I want to prevent him/her from going back to that filled in page. I
found the code below as a response to an earlier post in this NG but it
doesn't seem to have any effect.. Afterr the user clicks on the Submit
button, the data is saved to the DB and the user sees the "Done" page but if
he/she clicks on "Back" they get the original page with all the filled-in
fields?


============= Code ===============
Private Sub btnSubmit_Click(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles btnSubmit.Click

If Not Me.IsValid Then Exit Sub

SaveData()



Response.Expires = 0

Response.Cache.SetNoStore()

Response.AppendHeader("Pragma", "no-cache")

Response.Redirect("frmDone2.aspx")

Response.End()



End Sub
 
B

Bruce Barker

you send to disable caching on the original render - note the redirect

-- bruce (sqlwork.com)
 
W

Wayne Wengert

Thanks Bruce - that was the problem!

Wayne

Bruce Barker said:
you send to disable caching on the original render - note the redirect

-- bruce (sqlwork.com)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads

How to expire a page (VB) ASP.NET 4
Page Expire 2
Force Page Expire 0
How to expire an ASP.NET page? 6
Page Expire 2
Expire IE browser cache, again. 4
Page Expire 1
Expire Page 4

Members online

Forum statistics

Threads
473,772
Messages
2,569,588
Members
45,100
Latest member
MelodeeFaj
Top