expiring pages

G

Gav

Hi,
I have a form which sibmits data to another page. Trouble is when the user
refreshes the page it resubmits all the data again.

Is there anyway to expire the page immediatly so this cant happen??

gav
 
S

Steven Burn

<%Response.Clear%>

--
Regards

Steven Burn
Ur I.T. Mate Group
www.it-mate.co.uk

Keeping it FREE!

Disclaimer:
I know I'm probably wrong, I just like taking part ;o)
 
D

Dave Anderson

Gav said:
I have a form which sibmits data to another page. Trouble
is when the user refreshes the page it resubmits all the
data again.

Is there anyway to expire the page immediatly so this cant
happen??

The process and redirect model is well suited for this. You can implement it
with or without post-back. Here are a couple of stripped down examples:

Process and redirect with post-back ---------------------------
[p1.asp]
<%
If Request.Form.Count AND (validation criteria) > 0 Then
{ process data, assign cookie or session info }
Response.Redirect("p2.asp")
End If
%>
...
<FORM ACTION="p1.asp">

[p2.asp]
<% { read cookie/session data, process page } %>


Process and redirect without post-back ------------------------
[p1.asp]
<FORM ACTION="p2.asp">

[p2.asp]
<%
If (validation criteria) Then
{ process data, assign cookie or session info }
Response.Redirect("p3.asp")
Else
Response.Redirect("p1.asp")
End If
%>

[p3.asp]
<% { read cookie/session data, process page } %>



--
Dave Anderson

Unsolicited commercial email will be read at a cost of $500 per message. Use
of this email address implies consent to these terms. Please do not contact
me directly or ask me to contact you directly for assistance. If your
question is worth asking, it's worth posting.
 
B

Brynn

Yeah, 3 files

form.asp
formaction.asp (with redirect to...)
formconfirmation.asp

also, then they hit the back button, it will take them back to the
form, instead of formaction



Gav said:
I have a form which sibmits data to another page. Trouble
is when the user refreshes the page it resubmits all the
data again.

Is there anyway to expire the page immediatly so this cant
happen??

The process and redirect model is well suited for this. You can implement it
with or without post-back. Here are a couple of stripped down examples:

Process and redirect with post-back ---------------------------
[p1.asp]
<%
If Request.Form.Count AND (validation criteria) > 0 Then
{ process data, assign cookie or session info }
Response.Redirect("p2.asp")
End If
%>
...
<FORM ACTION="p1.asp">

[p2.asp]
<% { read cookie/session data, process page } %>


Process and redirect without post-back ------------------------
[p1.asp]
<FORM ACTION="p2.asp">

[p2.asp]
<%
If (validation criteria) Then
{ process data, assign cookie or session info }
Response.Redirect("p3.asp")
Else
Response.Redirect("p1.asp")
End If
%>

[p3.asp]
<% { read cookie/session data, process page } %>



--
Dave Anderson

Unsolicited commercial email will be read at a cost of $500 per message. Use
of this email address implies consent to these terms. Please do not contact
me directly or ask me to contact you directly for assistance. If your
question is worth asking, it's worth posting.
 

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

Members online

No members online now.

Forum statistics

Threads
473,755
Messages
2,569,537
Members
45,024
Latest member
ARDU_PROgrammER

Latest Threads

Top