Since when is a Refresh a PostBack?

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Jonathan Wood

    #1

    Since when is a Refresh a PostBack?

    I'm getting into the habit of checking IsPostBack in my Form_Load handler
    and not updating the page if it is a postback.

    However, I notice that if I hit my browser's refresh button, the page
    refreshes without any data.

    Since when is a refresh a postback?

    Thanks.

    --
    Jonathan Wood
    SoftCircuits Programming


  • Mark Rae [MVP]

    #2
    Re: Since when is a Refresh a PostBack?

    "Jonathan Wood" <jwood@softcirc uits.comwrote in message
    news:ey%236Y56a IHA.4696@TK2MSF TNGP05.phx.gbl. ..
    Since when is a refresh a postback?
    The Refresh button reloads the page in exactly the way that it was
    originally loaded... If it was originally loaded as a result of a postback,
    then hitting the Refresh button will cause it to be reloaded as from a
    postback...

    This is standard browser behaviour...


    --
    Mark Rae
    ASP.NET MVP


    Comment

    • Eliyahu Goldin

      #3
      Re: Since when is a Refresh a PostBack?

      A postback is no more than setting 2 hidden fields __EVENTTARGET and
      __EVENTARGUMENT and calling the form's submit() method.

      What hitting the Refresh button does is repeating the last submit() call
      with exactly the same settings of all fields. Hence you get the effect you
      are observing.

      --
      Eliyahu Goldin,
      Software Developer
      Microsoft MVP [ASP.NET]




      "Jonathan Wood" <jwood@softcirc uits.comwrote in message
      news:ey%236Y56a IHA.4696@TK2MSF TNGP05.phx.gbl. ..
      I'm getting into the habit of checking IsPostBack in my Form_Load handler
      and not updating the page if it is a postback.
      >
      However, I notice that if I hit my browser's refresh button, the page
      refreshes without any data.
      >
      Since when is a refresh a postback?
      >
      Thanks.
      >
      --
      Jonathan Wood
      SoftCircuits Programming

      >

      Comment

      • Jonathan Wood

        #4
        Re: Since when is a Refresh a PostBack?

        Yeah, okay, I may have more going on here than I originally thought.

        Thanks for putting me back on the right track.

        --
        Jonathan Wood
        SoftCircuits Programming


        "Mark Rae [MVP]" <mark@markNOSPA Mrae.netwrote in message
        news:%239LdMa8a IHA.4140@TK2MSF TNGP04.phx.gbl. ..
        "Jonathan Wood" <jwood@softcirc uits.comwrote in message
        news:ey%236Y56a IHA.4696@TK2MSF TNGP05.phx.gbl. ..
        >
        >Since when is a refresh a postback?
        >
        The Refresh button reloads the page in exactly the way that it was
        originally loaded... If it was originally loaded as a result of a
        postback, then hitting the Refresh button will cause it to be reloaded as
        from a postback...
        >
        This is standard browser behaviour...
        >
        >
        --
        Mark Rae
        ASP.NET MVP
        http://www.markrae.net

        Comment

        • Mark Rae [MVP]

          #5
          Re: Since when is a Refresh a PostBack?

          "Jonathan Wood" <jwood@softcirc uits.comwrote in message
          news:u5MixDCbIH A.4144@TK2MSFTN GP05.phx.gbl...
          Thanks for putting me back on the right track.
          You still persist in top-posting, though...


          --
          Mark Rae
          ASP.NET MVP


          Comment

          • Jonathan Wood

            #6
            Re: Since when is a Refresh a PostBack?

            Oh well.

            --
            Jonathan Wood
            SoftCircuits Programming


            "Mark Rae [MVP]" <mark@markNOSPA Mrae.netwrote in message
            news:eV7S8AFbIH A.3572@TK2MSFTN GP02.phx.gbl...
            "Jonathan Wood" <jwood@softcirc uits.comwrote in message
            news:u5MixDCbIH A.4144@TK2MSFTN GP05.phx.gbl...
            >
            >Thanks for putting me back on the right track.
            >
            You still persist in top-posting, though...
            >
            >
            --
            Mark Rae
            ASP.NET MVP
            http://www.markrae.net

            Comment

            • Mark Rae [MVP]

              #7
              Re: Since when is a Refresh a PostBack?

              "Jonathan Wood" <jwood@softcirc uits.comwrote in message
              news:ex1KAdFbIH A.5348@TK2MSFTN GP03.phx.gbl...
              >You still persist in top-posting, though...
              >
              Oh well.
              Learning how to snip would be useful too...


              --
              Mark Rae
              ASP.NET MVP


              Comment

              Working...