ASP Caching

M

Mahesh

Hello,
I have a simple web form page in which I insert/update
data to a database. The SQL code to insert data is
written in a server side submit button. Every thing works
fine. But,Whenever I insert a record (by hitting the
submit button) and immediately refresh the page using F5
or page refresh in IE, I see a duplicate entry entered
into the database exactly with the same values of my
previous insert.
However the values for all the controls in the form are
empty. I would really appreciate if some one can help on
this.
Thanks in advance.
 
B

Benjie Fallar

i suggest that after inserting/updating is successful, try to redirect to
confirmation page thus to avoid refreshing the postback page.

hope this helps.
 
M

Mahesh

Thank you for your reply.
But the problem is doesn't happen every time. Only when I
manually hit refresh after I hit the submit button. It is
a data entry screen, so users wanted to stay remain in
the screen after inserting a new record. For some reason
if they hit refresh then the same record is likely to be
inserterd twice or whenever they hit refresh.
 

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,744
Messages
2,569,484
Members
44,903
Latest member
orderPeak8CBDGummies

Latest Threads

Top