updatepanel中的Update()无法正常工作 [英] Update() in updatepanel not working
本文介绍了updatepanel中的Update()无法正常工作的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我在模式popupextender中使用更新面板,我需要在按钮点击事件后重新加载更新面板。
但我无法做到。
请帮忙!
以下是我用过的东西:
< asp:UpdatePanel ID = up4 runat = server >
< ContentTemplate >
........
< / ContentTemplate >
< / asp:UpdatePanel >
在按钮点击事件中,我写道:
up4.ChildrenAsTriggers = false;
up4.UpdateMode = UpdatePanelUpdateMode.Conditional;
up4。更新();
解决方案
你是更新更新面板条件。
请指定UpdateMode =条件
。
确保使用脚本管理器。
您的整个代码将如下所示。
< < span class =code-leadattribute> asp:ScriptManager ID = ScriptManager1 runat = server / >
< asp:UpdatePanel ID = up4 < span class =code-attribute> UpdateMode = 条件 runat = server >
< ContentTemplate >
........
< / ContentTemplate >
< / asp:UpdatePanel > 跨度>
I am using an update panel in a modal popupextender where I need to reload the update panel after a button click event.
But I am unable to do it.
Please help!
Below is the thing I used:
<asp:UpdatePanel ID="up4" runat="server">
<ContentTemplate>
........
</ContentTemplate>
</asp:UpdatePanel>
And in the button click event, I wrote this:
up4.ChildrenAsTriggers = false;
up4.UpdateMode = UpdatePanelUpdateMode.Conditional;
up4.Update();
解决方案
you are updating update panel conditional.
Please specifyUpdateMode="Conditional"
.
Make sure that you have use script manager.
You whole code will look like this.
<asp:ScriptManager ID="ScriptManager1" runat="server" /> <asp:UpdatePanel ID="up4" UpdateMode="Conditional" runat="server"> <ContentTemplate> ........ </ContentTemplate> </asp:UpdatePanel>
这篇关于updatepanel中的Update()无法正常工作的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文