此代码位于用户控件中。我提供了一个示例代码结构来获得概述。
<Update Panel UpdateMode= "Conditional">
<panel></panel>
<panel>
<button></button>
</panel>
<updatepanel UpdateMode="Conditional"></updatepanel>
</Updatepanel>
所以当我点击第二个面板中的一个按钮时,我应该隐藏该面板并且它正在发生但同时其他面板正在刷新。可能的原因是什么?
答案 0 :(得分:0)
根据代码段,您可能需要解决几个问题:
ScriptManager
EnablePartialRendering="true"
<UpdatePanel>
元素ASP.NET UpdatePanel控件来更正您的标记。UpdateMode="Conditional"
添加到两个UpdatePanel控件实施例
<asp:ScriptManager ID="MyScriptManager" EnablePartialRendering="true" runat="server"></asp:ScriptManager>
<asp:UpdatePanel ID="MyUpdatePanel" runat="server">
<ContentTemplate>
<asp:Label ID="Label1" runat="server" Text="This is a label!"></asp:Label>
<asp:Button ID="Button1" runat="server" Text="Click Me" />
</ContentTemplate>
</asp:UpdatePanel>
以下文章是了解有关UpdatePanel的详细信息以及有关其功能的详细信息的绝佳资源。