locked
How to prevent re-submitting of form when user re-opens Edge with "previous pages" as their setting. RRS feed

  • Question

  • User2028823583 posted

    I have a very simple asp.net web page that when a user clicks submit, it stores data to a sql database and sends an email notification.   It works fine, unless when you close Edge, and have "Previous Pages" selected as the setting for "Open Microsoft Edge With".  In that case, the next time a user opens Edge, all the pages re-open and the form re-submits.  

    Looking to see how to prevent this?  What would you suggest?  

    Monday, March 11, 2019 12:00 PM

Answers

  • User475983607 posted

    I have a very simple asp.net web page that when a user clicks submit, it stores data to a sql database and sends an email notification.   It works fine, unless when you close Edge, and have "Previous Pages" selected as the setting for "Open Microsoft Edge With".  In that case, the next time a user opens Edge, all the pages re-open and the form re-submits.  

    Looking to see how to prevent this?  What would you suggest?  

    This situation is commonly solved using the POST/GET/Redirect pattern.

    https://en.wikipedia.org/wiki/Post/Redirect/Get

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Monday, March 11, 2019 12:38 PM