如何更新特定的updatepanel [英] How to update specific updatepanel
问题描述
我在页面上有多个更新面板。其中有一个特定面板中的fileupdate控件。要上传文档,我必须使用ScriptManager.GetCurrent(this.Page).RegisterPostBackControl(btnDocument)注册提交按钮。但是点击此按钮可以刷新所有更新面板。
我尝试过:
我想只更新包含fileupload控件的updatepanel。我尝试了很多但却无法做到。这该怎么做。请帮助
将UpdateMode
设置为条件
所有UpdatePanels
UpdateMode =有条件
并通过调用更新
方法更新/刷新特定的UpdatePanel
updatepanelName.Update();
i have multiple updatepanels on page. Out of them there is a fileupdate control in a specific panel. To upload document i have to register the submit button using ScriptManager.GetCurrent(this.Page).RegisterPostBackControl(btnDocument). But on clicking this button it is refreshing all updatepanels.
What I have tried:
I want to update only the updatepanel that contains fileupload control. I tried a lot but not able to do. How to do this. Please help
Set theUpdateMode
asConditional
for all theUpdatePanels
UpdateMode="Conditional"
and update/refresh the particularUpdatePanel
by callingUpdate
method
updatepanelName.Update();
refer this What is the main purpose of UpdateMode in UpdatePanel ? | The ASP.NET Forums[^]
这篇关于如何更新特定的updatepanel的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!