locked
Adding a Time Entry RRS feed

  • Question

  • User-1728695727 posted

    After you add a time entry, if you click the browsers refresh button, it will execute the add time entry button click again.  How do you prevent this?

     Thanks in advance

    Tuesday, October 24, 2006 9:48 AM

All replies

  • User541108374 posted

    Hi,

    this article could be of interest to you: Prevent Users from Submitting a Form Twice.

    Grz, Kris.

    Tuesday, October 24, 2006 9:55 AM
  • User-1728695727 posted

    Thanks, that will be useful to me for something else I'm doing.  However, that only deals with disabling the page or the button.  The problem in timetracker is that, after you add a time entry, if for some reason the user refreshes the browser, the entry gets submitted again.  It executes the add button click event again.

    Any other ideas?

    Tuesday, October 24, 2006 12:06 PM
  • User753645743 posted
    It seems like asp.net should have some validation to handle that.  If not, you could write some code to check the database for a duplicate submission.
    Tuesday, October 24, 2006 3:45 PM
  • User-1728695727 posted
    yes..I've done that.  I'm just curious if asp.net has a way to prevent it...
    Tuesday, October 24, 2006 4:22 PM
  • User541108374 posted

    Hi,

    yet another article (YAA): Build your ASP.NET pages on a richer bedrock.

    Grz, Kris.

    Wednesday, October 25, 2006 3:24 AM
  • User-1728695727 posted
    Many thanks...looks like a good article
    Wednesday, October 25, 2006 8:41 AM