如何更新在另一个的UpdatePanel控件? [英] how to update a control in another updatepanel?
本文介绍了如何更新在另一个的UpdatePanel控件?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我在层级3的UpdatePanel:
I have three updatepanels in hierarchy:
UpdatePanel1--Root
UpdatePanelChild1
UpdatePanelChild2
我可以更新updatePanel1控制在updatepanel2的事件?
Can I update a control in updatePanel1 on an event of the updatepanel2?
推荐答案
我并不是每一个更新的UpdatePanel所有的时间的忠实粉丝 - 这似乎是撤销地方更新面板让你
I'm not a big fan of every updatepanel updating all the time - that seems to undo the locality update panels get you.
另一种方法是专门打电话通知其他更新面板的.Update()方法,在你的code。例如,假设你有UppdatePanelChild1一个按钮,做一些处理并修改UpdatePanel2控制:
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();
这篇关于如何更新在另一个的UpdatePanel控件?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文