Forms RePost best practice?

G

Guest

Okay, this should be pretty simple for those of you who have written several
enterprise level web applications:

I'm looking for simple concepts to deal with a client re-posting the same
data over and over. IE: Adding a comment to a record, adding an item to a
cart etc. (hitting the refresh button over and over re-posting the old values)

I’m looking for a solution a little more elegant than comparing data values
etc. I would rather intercept and detect that this is an “unnecessary†re
post early in the process.

What are some of the "best practices" that have been used? I'm not looking
for the detail of implementation (but feel free to explain if you would like).

I have been tossing a few ideas around in my head such as a base class that
all web forms inherit from that assigns a simple "time stamp" key to the form
value and then increments or modifies it on the server with each post but
this is not a "best practice" because it introduces process affinity.

Most of what I do is deployed in a web farm/garden environment so we do use
SQLServer session management. I prefer to stay clear of methods that would
make it necessary to store the “key†in session for every post.

Any thoughts?

Thanks!
 
P

Patrice

If you want to prevent multiple clicks you could hide the whole form and
display a wait message instead.

If this is more a data consistency problem, it's likely best to suggest only
items that are not yet added or to react accordingly based on expected usage
(for example you could consider the user wants either to command an
additional quantity or replace its command, you could them ask them wether
he wants to do one or the other).

Patrice
 

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,995
Messages
2,570,230
Members
46,816
Latest member
SapanaCarpetStudio

Latest Threads

Top