Refresh button.

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • John Blair

    Refresh button.

    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

    #2
    Re: Refresh button.

    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" <john_blair@hot mail.com> wrote in message
    news:K2nTe.6588 $VB1.161@newsfe 1-gui.ntli.net...[color=blue]
    > Hi,
    >
    > During a postback is there anyway of knowing for sure if it was due to the
    > user hitting the Refresh button?
    >
    > Thanks.
    >[/color]


    Comment

    • John Blair

      #3
      Re: Refresh button.

      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" <peter@nospam.r illing.net> wrote in message
      news:%23iDcBdys FHA.1448@TK2MSF TNGP10.phx.gbl. ..[color=blue]
      > 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" <john_blair@hot mail.com> wrote in message
      > news:K2nTe.6588 $VB1.161@newsfe 1-gui.ntli.net...[color=green]
      >> Hi,
      >>
      >> During a postback is there anyway of knowing for sure if it was due to
      >> the user hitting the Refresh button?
      >>
      >> Thanks.
      >>[/color]
      >
      >[/color]


      Comment

      • Joe Fallon

        #4
        Re: Refresh button.

        Dino Esposito wrote some code to show one way to trap for this:

        --
        Joe Fallon




        "John Blair" <john_blair@hot mail.com> wrote in message
        news:K2nTe.6588 $VB1.161@newsfe 1-gui.ntli.net...[color=blue]
        > Hi,
        >
        > During a postback is there anyway of knowing for sure if it was due to the
        > user hitting the Refresh button?
        >
        > Thanks.
        >[/color]


        Comment

        Working...