Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. Web Development
  3. ASP.NET
  4. Help with IsPostBack property

Help with IsPostBack property

Scheduled Pinned Locked Moved ASP.NET
help
5 Posts 4 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • S Offline
    S Offline
    SrividhyaS
    wrote on last edited by
    #1

    I have a datagrid. In the datagrid,I have a CheckBox Column.When I click the checkBox that i need and click the button,the page gets refreshed and all the data that i checked goes off. Kindly help me where to give the IsPostBack property. Thanks in Advance.

    Happy Programming!!!

    M M K 3 Replies Last reply
    0
    • S SrividhyaS

      I have a datagrid. In the datagrid,I have a CheckBox Column.When I click the checkBox that i need and click the button,the page gets refreshed and all the data that i checked goes off. Kindly help me where to give the IsPostBack property. Thanks in Advance.

      Happy Programming!!!

      M Offline
      M Offline
      Manas Bhardwaj
      wrote on last edited by
      #2

      In the load event, check if the page isPostBack...

      1 Reply Last reply
      0
      • S SrividhyaS

        I have a datagrid. In the datagrid,I have a CheckBox Column.When I click the checkBox that i need and click the button,the page gets refreshed and all the data that i checked goes off. Kindly help me where to give the IsPostBack property. Thanks in Advance.

        Happy Programming!!!

        M Offline
        M Offline
        marky777
        wrote on last edited by
        #3

        In Page_Load do this: if (!Page.IsPostBack) { //do stuff }

        1 Reply Last reply
        0
        • S SrividhyaS

          I have a datagrid. In the datagrid,I have a CheckBox Column.When I click the checkBox that i need and click the button,the page gets refreshed and all the data that i checked goes off. Kindly help me where to give the IsPostBack property. Thanks in Advance.

          Happy Programming!!!

          K Offline
          K Offline
          kubben
          wrote on last edited by
          #4

          I would say most likely you are refreshing you datagrid on pageload. So when you button posts back to the web service the page load event runs and you databind your datagrid with new data. So most likely you need to surround your existing code in your page load with if Not IsPostBack Then or if !IsPostBack { So that you only load the datagrid once, not every time the page posts back. Hope that helps. Ben

          S 1 Reply Last reply
          0
          • K kubben

            I would say most likely you are refreshing you datagrid on pageload. So when you button posts back to the web service the page load event runs and you databind your datagrid with new data. So most likely you need to surround your existing code in your page load with if Not IsPostBack Then or if !IsPostBack { So that you only load the datagrid once, not every time the page posts back. Hope that helps. Ben

            S Offline
            S Offline
            SrividhyaS
            wrote on last edited by
            #5

            My problem is solved now.Thanks to all 3 of You...God Bless U...:-D

            Happy Programming!!!

            1 Reply Last reply
            0
            Reply
            • Reply as topic
            Log in to reply
            • Oldest to Newest
            • Newest to Oldest
            • Most Votes


            • Login

            • Don't have an account? Register

            • Login or register to search.
            • First post
              Last post
            0
            • Categories
            • Recent
            • Tags
            • Popular
            • World
            • Users
            • Groups