Refresh button.

Discussion in 'ASP .Net' started by John Blair, Sep 6, 2005.

  1. John Blair

    John Blair Guest

    Hi,

    During a postback is there anyway of knowing for sure if it was due to the
    user hitting the Refresh button?

    Thanks.
     
    John Blair, Sep 6, 2005
    #1
    1. Advertising

  2. You will probably need to handle this yourself like keep track of when
    something has been posted.

    What I usually do is to do a Redirect back to the page so that there is no
    form data to send back when refreshing the page.

    "John Blair" <> wrote in message
    news:K2nTe.6588$...
    > Hi,
    >
    > During a postback is there anyway of knowing for sure if it was due to the
    > user hitting the Refresh button?
    >
    > Thanks.
    >
     
    Peter Rilling, Sep 6, 2005
    #2
    1. Advertising

  3. John Blair

    John Blair Guest

    Thanks for the feedback, but once the user hits the Refresh button on the
    browser as far as im aware the next time you have code control is in the
    server page_load/page_init event - so i dont see any scope for doing a
    redirect?

    The postback data arrives as per the previous postback prior to doing the
    refresh. Hence my problem with knowing if the refresh button was hit or not?


    "Peter Rilling" <> wrote in message
    news:%...
    > You will probably need to handle this yourself like keep track of when
    > something has been posted.
    >
    > What I usually do is to do a Redirect back to the page so that there is no
    > form data to send back when refreshing the page.
    >
    > "John Blair" <> wrote in message
    > news:K2nTe.6588$...
    >> Hi,
    >>
    >> During a postback is there anyway of knowing for sure if it was due to
    >> the user hitting the Refresh button?
    >>
    >> Thanks.
    >>

    >
    >
     
    John Blair, Sep 6, 2005
    #3
  4. John Blair

    Joe Fallon Guest

    Dino Esposito wrote some code to show one way to trap for this:
    http://www.dotmugs.ch/events/event.aspx?eid=17
    --
    Joe Fallon




    "John Blair" <> wrote in message
    news:K2nTe.6588$...
    > Hi,
    >
    > During a postback is there anyway of knowing for sure if it was due to the
    > user hitting the Refresh button?
    >
    > Thanks.
    >
     
    Joe Fallon, Sep 7, 2005
    #4
    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. Stan
    Replies:
    1
    Views:
    1,855
    Tomasz Kaszuba
    Jun 30, 2003
  2. brian lanning
    Replies:
    0
    Views:
    631
    brian lanning
    Jul 29, 2003
  3. Per Magnus L?vold
    Replies:
    1
    Views:
    5,213
    John C. Bollinger
    Oct 8, 2004
  4. Pkenty
    Replies:
    0
    Views:
    436
    Pkenty
    May 28, 2004
  5. Jawahar Rajan
    Replies:
    1
    Views:
    312
    Adrienne
    Oct 1, 2003
Loading...

Share This Page