473,811 Members | 2,950 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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 1402
<%Response.Clea r%>

--
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*****@ntlwor ld.com> wrote in message
news:lg******** *********@newsf ep2-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.Co unt AND (validation criteria) > 0 Then
{ process data, assign cookie or session info }
Response.Redire ct("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.Redire ct("p3.asp")
Else
Response.Redire ct("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...)
formconfirmatio n.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**********@s pammotel.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.Co unt AND (validation criteria) > 0 Then
{ process data, assign cookie or session info }
Response.Redire ct("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.Redire ct("p3.asp")
Else
Response.Redire ct("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
1580
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: session.gc_probability session.gc_maxlifetime session.cache_expire
11
2715
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 the POSTDATA content has expired and they need to refresh the page then they get a alert about refreshing expired data. I am getting complaints that this is too annoying and limits the sites useability.
2
4343
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 been searching around trying to get this to happen for one of my aspx pages and I can't get it to expire. I've put the following HTML tags in the page: <meta http-equiv="expires" content="Sun, Dec 31 1970 12:00:00 GMT"> <meta...
2
2746
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 results. Any pointers/suggestions would be very appreciated. Things were running as usual till until recently. Here are the relevant pieces of code ==========================================
6
1776
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 aspnet_wp process is not restarting during this time, and there are no other requests, so nothing should be clearing this out. I have added a CacheItemRemovedCallback which writes debug info out to a DefaultTraceListener, but no output shows up on...
3
991
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 was created using information you submitted in a form. This page is no longer available. As a security precaution, Internet Explorer does not automatically resubmit your information for you. To resubmit your information and view this Web page,...
2
1012
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 the page to expire in .net? Regards, Chris.
1
1309
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 website in IE7- the funny thing is that i have just tried it in firfox and everything is working fine and session state is not expiring.
0
1035
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 'New-ExchangeCertificate' cmdlet with no parameters and that has created a new certificate in the same location as the expiring one. ***** However, the warnings continue. Do I need to do something else?? *****
0
9734
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
10653
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10395
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
10137
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
9211
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
6895
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5700
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4352
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3876
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.