如何更新特定的updatepanel [英] How to update specific updatepanel

查看:65
本文介绍了如何更新特定的updatepanel的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在页面上有多个更新面板。其中有一个特定面板中的fileupdate控件。要上传文档,我必须使用ScriptManager.GetCurrent(this.Page).RegisterPostBackControl(btnDocument)注册提交按钮。但是点击此按钮可以刷新所有更新面板。



我尝试过:



我想只更新包含fileupload控件的updatepanel。我尝试了很多但却无法做到。这该怎么做。请帮助

解决方案

UpdateMode 设置为条件所有 UpdatePanels

 UpdateMode =有条件



并通过调用更新方法更新/刷新特定的 UpdatePanel

 updatepanelName.Update(); 



请参阅此什么是UpdatePanel中UpdateMode的主要用途? | ASP.NET论坛 [ ^ ]


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 the UpdateMode as Conditional for all the UpdatePanels

UpdateMode="Conditional" 


and update/refresh the particular UpdatePanel by calling Update method

updatepanelName.Update();


refer this What is the main purpose of UpdateMode in UpdatePanel ? | The ASP.NET Forums[^]


这篇关于如何更新特定的updatepanel的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆