Difference !Page.IsPostBack and !IsPostBack

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • baburk
    New Member
    • Oct 2006
    • 111

    Difference !Page.IsPostBack and !IsPostBack

    Hi all,

    What is the differenct between

    "if (!Page.IsPostBa ck) " and "if(!IsPostBack )"

    Thanks.
  • kenobewan
    Recognized Expert Specialist
    • Dec 2006
    • 4871

    #2
    Gee this wouldn't have anything to do with the page reference would it?

    Comment

    • jhaxo
      New Member
      • Dec 2007
      • 57

      #3
      Originally posted by baburk
      Hi all,

      What is the differenct between

      "if (!Page.IsPostBa ck) " and "if(!IsPostBack )"

      Thanks.
      No difference. IsPostback is the same is this.IsPostBack and this is a page.

      Comment

      • kenobewan
        Recognized Expert Specialist
        • Dec 2006
        • 4871

        #4
        Originally posted by jhaxo
        No difference. IsPostback is the same is this.IsPostBack and this is a page.
        Except it is possible to receive a null reference error without, so they are not exactly the same.

        Comment

        • jhaxo
          New Member
          • Dec 2007
          • 57

          #5
          Originally posted by kenobewan
          Except it is possible to receive a null reference error without, so they are not exactly the same.
          ok. if you are a page, I have never gotten a null reference error. When does it happen ? this is null?

          Comment

          • kenobewan
            Recognized Expert Specialist
            • Dec 2006
            • 4871

            #6
            ok. If you have a web form and you do not provide full referencing, best practice, you may receive a missing reference error. Suggest you try different sampling techniques. HTH.

            Comment

            Working...