how to prevent a page refresh to behave like a submit postback?

Discussion in 'ASP .Net' started by Carlos, Jul 2, 2008.

  1. Carlos

    Carlos Guest

    Hi all,

    I need to know how to prevent to repeat the operations
    that happen when the submit button is clicked, when the
    page is refreshed.

    I noticed that if I refresh my page after the submit button is clicked,
    the event is again activated even though I just refreshed the page,
    did not push the button again..

    Thanks,

    Carlos.
     
    Carlos, Jul 2, 2008
    #1
    1. Advertising

  2. Carlos

    Hans Kesting Guest

    on 2-7-2008, Carlos supposed :
    > Hi all,
    >
    > I need to know how to prevent to repeat the operations
    > that happen when the submit button is clicked, when the
    > page is refreshed.
    >
    > I noticed that if I refresh my page after the submit button is clicked,
    > the event is again activated even though I just refreshed the page,
    > did not push the button again..
    >
    > Thanks,
    >
    > Carlos.


    What I sometimes use is this: after the submit action has completed,
    issue a redirect to the (same) page. This will force an extra
    roundtrip, but the browser "forgets" about that post-action (the
    submit).

    Hans Kesting
     
    Hans Kesting, Jul 2, 2008
    #2
    1. Advertising

  3. Carlos

    Carlos Guest

    Thank you so much Hans for your prompt reply.

    Carlos.

    "Hans Kesting" <> wrote in message
    news:%...
    > on 2-7-2008, Carlos supposed :
    >> Hi all,
    >>
    >> I need to know how to prevent to repeat the operations
    >> that happen when the submit button is clicked, when the
    >> page is refreshed.
    >>
    >> I noticed that if I refresh my page after the submit button is clicked,
    >> the event is again activated even though I just refreshed the page,
    >> did not push the button again..
    >>
    >> Thanks,
    >>
    >> Carlos.

    >
    > What I sometimes use is this: after the submit action has completed, issue
    > a redirect to the (same) page. This will force an extra roundtrip, but the
    > browser "forgets" about that post-action (the submit).
    >
    > Hans Kesting
    >
    >
     
    Carlos, Jul 2, 2008
    #3
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. MattB
    Replies:
    6
    Views:
    14,107
    siddharthad
    Sep 21, 2006
  2. Aaron Fude
    Replies:
    3
    Views:
    522
    brucie
    Jul 6, 2004
  3. WJ
    Replies:
    11
    Views:
    136,033
    adallas
    Mar 3, 2011
  4. Replies:
    12
    Views:
    2,236
    Howard
    Jun 16, 2005
  5. bill
    Replies:
    7
    Views:
    231
    Mick White
    Jul 7, 2004
Loading...

Share This Page