New row inserted for each page refresh

后端 未结 5 929
别那么骄傲
别那么骄傲 2021-01-15 03:27

Hi I\'m getting a strange problem while inserting records into database. In my button click event I\'m trying to insert some values into my database it is working fine. Once

5条回答
  •  隐瞒了意图╮
    2021-01-15 03:49

    Simply because refresh caused another postback which re-do the insertion operation.

    You might want to perform a redirect to the same page to prevent that. There are some other means to handle this issue as well.

提交回复
热议问题