IsPostBack Problem

lorena

Centurion
Joined
Oct 23, 2003
Messages
134
Location
Phoenix, Arizona
I have a simple form that I have created. It accepts input and sends the results as e-mail. After the user clicks "Submit", they are redirected to a "Thank You" page. I want to be sure that if they click the "Back" arrow/button on their browser, they see a blank form.
I have this code (which doesn't work)
Sub Page_Load
If Page.IsPostBack=True Then
commentText.text = ""
commentName.text = ""
commentEmail.text = ""
commentTel.text = ""
commentType.SelectedItem.value = "Question"
contact.checked = False
End If
End Sub

What else can I do? Is there another way to have the page expire so it won't be submitted twice?
Thanks
 
I'm not sure the exacts, I've seen it before and someone will point you in the right direction, basically 'Back' isn't a post-back. If I recall correctly, it's pulling the data off the user's machine cache. I believe if you set the Cache attribute of the page to 1 or 0 it will expire immediately and if the user hit's back he will get 'this page has expired' generic error... something along those lines... never had to do it myself.
 
Back
Top