Is there any way to get click event of refresh button of browser?

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • sachin2320
    New Member
    • Mar 2010
    • 7

    Is there any way to get click event of refresh button of browser?

    Hi


    Is there any way to get click event of refresh button of browser ?



    thanks
  • CroCrew
    Recognized Expert Contributor
    • Jan 2008
    • 564

    #2
    Hello sachin2320,

    Not that I know of. But, I you could use the Page_Load event in a way that would work for you.

    Code:
        Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
            If Not (IsPostBack) Then
                'do something here
            End If
        End Sub
    Happy Coding,
    CroCrew~

    Comment

    • sachin2320
      New Member
      • Mar 2010
      • 7

      #3
      thanks for reply
      I know it but problem is to get click event of refresh button of the browser

      Im not sure it exist or not

      thanks

      Comment

      • CroCrew
        Recognized Expert Contributor
        • Jan 2008
        • 564

        #4
        Nope. Not that I know of. I don't think there will ever be one too.

        Comment

        • Frinavale
          Recognized Expert Expert
          • Oct 2006
          • 9749

          #5
          The only "click" events that your code can handle are any controls that exist in your page. The refresh button is not part of your page, it's part of the web browser. This means that there is no way to handle the click event for the refresh button in the browser.

          You can detect when the page is being unloaded using JavaScript...yo u might actually find this interesting.... check out the onbeforeuload JavaScript event to see if it can help you.

          -Frinny

          Comment

          Working...