how to update a control in another updatepanel?

一世执手 提交于 2019-12-01 21:33:17

I'm not a big fan of every updatepanel updating all the time - that seems to undo the locality update panels get you.

Another option is to specifically call the .Update() method of the OTHER update panel in your code. For example, suppose you have a button on UppdatePanelChild1 that does some processing and modifies a control in UpdatePanel2:

textBoxInsideUpdatePanel2.Text = "Updated!";
UpdatePanel2.Update();

Yes, the easiest way is have UpdateMode="Always"; then all update panels update regardless of whichever one triggered the postback.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!