How to get postbackurl and ispostback in asp.net?

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Nandadulal
    New Member
    • Jun 2010
    • 8

    How to get postbackurl and ispostback in asp.net?

    Sir, i want to know about ispostback in asp.net?
  • Plater
    Recognized Expert Expert
    • Apr 2007
    • 7872

    #2
    isPostback is just as it says on MSDN and the literature on isPostback.
    It is true when an asp.net page(aspx) page posts back to itself.

    Comment

    • Frinavale
      Recognized Expert Expert
      • Oct 2006
      • 9749

      #3
      "IsPostback " is a property of the Page object (the Page that you are currently working with).

      It is loaded when the ViewState for the page is loaded.

      It indicates whether or not the page is posting back to itself (in this case IsPostback would be True) or if it's the first time loading the page (in this case IsPostback would be False).

      -Frinny

      Comment

      • Nandadulal
        New Member
        • Jun 2010
        • 8

        #4
        Thanks ,
        that means redirect=ispost back.

        Comment

        • Frinavale
          Recognized Expert Expert
          • Oct 2006
          • 9749

          #5
          No, redirect is not postback.

          If your page has been redirected to from another page the IsPostback will be false because it's the first time loading the page.

          IsPostback is True if a control on the page causes the page to submit to the server.

          For example, say you have a button on the page...
          If the user was redirected to the page IsPostback == False at this point (it's the first time the page is loaded). If the user clicked the button and the button caused the page to submit to the server IsPostback == True in this case.

          -Frinny

          Comment

          Working...