ASP Caching

  • Thread starter Thread starter Mahesh
  • Start date Start date
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.
 
i suggest that after inserting/updating is successful, try to redirect to
confirmation page thus to avoid refreshing the postback page.

hope this helps.
 
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.
 
Back
Top