|
-
Aug 17th, 2004, 03:59 AM
#1
Thread Starter
Addicted Member
form can be submitted twice
I'm getting this strange problem whereby it seems that the same webform can get submitted twice even though I use response.redirect in my button click event. Some of the code in the button click event is executing (ie the update of the database and the sending of an email), but the page does not redirect). It doesn't happen on my development machine, and I think it could be something to do with the loggedin user's connection speed, but whatever it is, its a major pain, as they are able to click the button again, and create duplicate DB records and emails. I can kind of re-create this by submitting the page, and then quickly hitting the browser's stop button before the page redirects (the DB gets updated, the email gets sent, but the page does not redirect(allowin me to click the button a second time). Any ideas? Thanks in advance!
Pete
-
Aug 17th, 2004, 05:15 AM
#2
I thought you were on vacation?!
-
Aug 17th, 2004, 06:46 AM
#3
I wonder how many charact
ASP.NET (or was it iis) by default waits for the entire response stream to be written before it sends it to the client.
The best you can do is :
1) disable the submit button when clicked using javascript... and then post the page.
2) Check if the user has submitted something within 5 seconds of one another (by using a time stamp), and ignore the second post.
-
Aug 17th, 2004, 06:05 PM
#4
Thread Starter
Addicted Member
-
Aug 17th, 2004, 06:05 PM
#5
Thread Starter
Addicted Member
Originally posted by nemaroller
ASP.NET (or was it iis) by default waits for the entire response stream to be written before it sends it to the client.
The best you can do is :
1) disable the submit button when clicked using javascript... and then post the page.
2) Check if the user has submitted something within 5 seconds of one another (by using a time stamp), and ignore the second post.
thanks nemaroller, I'll try something like that!
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|