Help | Site Map
Connecting Tech Pros Worldwide
 
 
LinkBack Thread Tools
  #1  
Old July 19th, 2005, 01:39 PM
Laphan
Guest
 
Posts: n/a
Default Error Trapping the dreaded refresh

Hi All

My problem basically is as follows:

1) User enters their details to create a new account in my db.

2) They press the submit, the system successfully creates their new account
and then displays a page saying 'well done you've created your new account'.

3) The doofus (or clever clogs) clicks the Refresh button, which in turn
submits the details back to the db and creates a duplicate entry in my db.
I don't have a duplicate account num, as the system takes the max last one
and adds one to it so really no errors are generated, but it does mean that
they have 2 accounts now.

As mentioned above, this scenario crops up when doing a New Account page and
when they've just posted their order via the shopping cart final page (shall
we say). The latter worries me because duplicate orders would cause a lot
more hassle.

I realise this may be a common problem, but I'm not sure what the best
method is.

Your help/advice on how to handle this would really be appreciated.

Rgds

Laphan




  #2  
Old July 19th, 2005, 01:39 PM
Martin CLAVREUIL
Guest
 
Posts: n/a
Default Re: Error Trapping the dreaded refresh

Hi,

Usualy, instead of writing the answer at the end of the server-side
processing it's recommended to redirect the response this way :

<%
set val ...
val.Exec...
'Ok it's done

response.redirect "ThisIsDone.htm"
%>

regards,



"Laphan" <news@DoNotEmailMe.co.uk> a écrit dans le message de
news:40c32553_3@127.0.0.1...[color=blue]
> Hi All
>
> My problem basically is as follows:
>
> 1) User enters their details to create a new account in my db.
>
> 2) They press the submit, the system successfully creates their new[/color]
account[color=blue]
> and then displays a page saying 'well done you've created your new[/color]
account'.[color=blue]
>
> 3) The doofus (or clever clogs) clicks the Refresh button, which in turn
> submits the details back to the db and creates a duplicate entry in my db.
> I don't have a duplicate account num, as the system takes the max last one
> and adds one to it so really no errors are generated, but it does mean[/color]
that[color=blue]
> they have 2 accounts now.
>
> As mentioned above, this scenario crops up when doing a New Account page[/color]
and[color=blue]
> when they've just posted their order via the shopping cart final page[/color]
(shall[color=blue]
> we say). The latter worries me because duplicate orders would cause a lot
> more hassle.
>
> I realise this may be a common problem, but I'm not sure what the best
> method is.
>
> Your help/advice on how to handle this would really be appreciated.
>
> Rgds
>
> Laphan
>
>
>
>[/color]


  #3  
Old July 19th, 2005, 01:40 PM
Aaron [SQL Server MVP]
Guest
 
Posts: n/a
Default Re: Error Trapping the dreaded refresh

Laphan, please don't multi-post.

--
http://www.aspfaq.com/
(Reverse address to reply.)




"Laphan" <news@DoNotEmailMe.co.uk> wrote in message
news:40c32553_3@127.0.0.1...[color=blue]
> Hi All
>
> My problem basically is as follows:
>
> 1) User enters their details to create a new account in my db.
>
> 2) They press the submit, the system successfully creates their new[/color]
account[color=blue]
> and then displays a page saying 'well done you've created your new[/color]
account'.[color=blue]
>
> 3) The doofus (or clever clogs) clicks the Refresh button, which in turn
> submits the details back to the db and creates a duplicate entry in my db.
> I don't have a duplicate account num, as the system takes the max last one
> and adds one to it so really no errors are generated, but it does mean[/color]
that[color=blue]
> they have 2 accounts now.
>
> As mentioned above, this scenario crops up when doing a New Account page[/color]
and[color=blue]
> when they've just posted their order via the shopping cart final page[/color]
(shall[color=blue]
> we say). The latter worries me because duplicate orders would cause a lot
> more hassle.
>
> I realise this may be a common problem, but I'm not sure what the best
> method is.
>
> Your help/advice on how to handle this would really be appreciated.
>
> Rgds
>
> Laphan
>
>
>
>[/color]


 

Bookmarks

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are Off
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

What is Bytes?

We are a network of experts and professionals in IT and software development that help one another with answers to tough questions and share insights. Get the best answers to your questions from over network members.
Post your question now . . .
It's fast and it's free

Popular Articles