asp.net - updatepanel doesnt update correctly, must click twice to update -


i using update panel , when click button update panels.

updapanel1.update() simple, data not updating unless hit button twice.

my gridviews shows data selected user, , grids reflect users data. works fine update panels work gridviews.

now somereason when try row count , update panel summary, not work, either previous users summary or if hit update again same user correct data.

'the grids in these panels      updatepanel1.update()             updatepanel2.update()             updatepanel4.update()             updatepanel6.update()             updatepanel7.update()  'the things not updateing correctly             rqnum.text = gridview3.rows.count             oknum.text = gridview4.rows.count             xlnum.text = gridview5.rows.count             dynum.text = datalist1.items.count              updatepanel8.update()             panel1.visible = false 

without seeing code cannot guarantee giving right answer, thought. if code posted actual code, re-order things bit.

  1. do updates content
  2. then call "update" on panels

this ensures content updates sent panels. guess why takes second click. this.

'update content , toggle visibility of controls rqnum.text = gridview3.rows.count oknum.text = gridview4.rows.count xlnum.text = gridview5.rows.count dynum.text = datalist1.items.count panel1.visible = false  'now update needed panels updatepanel1.update() updatepanel2.update() updatepanel4.update() updatepanel6.update() updatepanel7.update()     updatepanel8.update() 

Comments

Popular posts from this blog

apache - Add omitted ? to URLs -

redirect - bbPress Forum - rewrite to wwww.mysite prohibits login -

php - How can I stop spam on my custom forum/blog? -