473,385 Members | 1,400 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

expiring pages

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
Jul 19 '05 #1
3 1389
<%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)
Gav <ga*****@ntlworld.com> wrote in message
news:lg*****************@newsfep2-gui.server.ntli.net...
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

Jul 19 '05 #2
"Gav" wrote:

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.
Jul 19 '05 #3
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

On Fri, 2 Jan 2004 08:29:35 -0600, "Dave Anderson"
<GT**********@spammotel.com> wrote:
"Gav" wrote:

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.


Jul 19 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: Gary Petersen | last post by:
I've seen a couple of questions regarding the expiring of sessions in PHP. The way to control how sessions expire is to set some options in php.ini. These options are of particular use:...
11
by: brendan | last post by:
Sorry this isnt a cross post .. i just didnt get any help from alt.php. I have a website which utilises post forms for navigation in some areas. Problem is, when *some* users hit the BACK button...
2
by: James | last post by:
I've been to websites where if I navigate off a form, trying to get back to it by hitting the back button gives me a page which says "Warning, page has expired". It doesn't display the page. I've...
2
by: pv_kannan | last post by:
I recently found out that my authentication cookies are not expiring even though I have set the persist property to false. As a result, users are able to access the secure websites with indifferent...
6
by: Adam | last post by:
On an xp machine, the caching works as expected. I have deployed to a win2k server, and an item I add to the cache expires almost immediately some times and in under a minute in other times. The...
3
by: tshad | last post by:
I get this error in some cases where I am hitting my Back button in IE. ************************************************************************* Warning: Page has Expired The page you requested...
2
by: Chris | last post by:
When navigating between pages on my site I'm developing I seem to getting a page expired page alot. I would like the back button to work. It always has on the other things I've done. What causes...
1
by: csgraham74 | last post by:
Hi Guys, Im currently going round in circles with a session state issue on an asp.net vb application. Basically session state is constantly expiring after about a few clicks through my...
0
by: =?Utf-8?B?Tmljaw==?= | last post by:
Hi, I have a problem with the expiring self signed certificate on our server. Warning Event IDs 12017 and 12018 occuring every few minutes in the Application Event viewer. I have run the...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.