C# 为什么updatepanel会触发另一个updatepanel?
我的ajax页面上有两个更新面板。这是我第一次使用updatepanel,我不知道出了什么问题。我认为只有btnFilter的Click事件必须触发第二个更新面板的内容,但更改组合值(同时隐藏/取消隐藏btnFilter按钮)会导致第二个updatepanel更改内容(至少我有时会看到firebug和第二个updatepanel闪烁的传输数据)。在线C# 为什么updatepanel会触发另一个updatepanel?,c#,asp.net,ajax,asp.net-ajax,C#,Asp.net,Ajax,Asp.net Ajax,我的ajax页面上有两个更新面板。这是我第一次使用updatepanel,我不知道出了什么问题。我认为只有btnFilter的Click事件必须触发第二个更新面板的内容,但更改组合值(同时隐藏/取消隐藏btnFilter按钮)会导致第二个updatepanel更改内容(至少我有时会看到firebug和第二个updatepanel闪烁的传输数据)。在线 品牌: 型号: 这里有一些代码 默认情况下,在每次异步回发期间,都会刷新每个UpdatePanel 要更改此行为,请将设置为条件+1,我想知道为
品牌:
型号:
这里有一些代码
默认情况下,在每次异步回发期间,都会刷新每个UpdatePanel
要更改此行为,请将设置为
条件
+1,我想知道为什么默认情况下它总是设置为
。必须与behindEnableViewState
的延迟相同,默认情况下为true。。。
<asp:UpdatePanel ID="upComparison" runat="server">
<ContentTemplate>
Brand:
<asp:DropDownList ID="ddlBrands" runat="server" AutoPostBack="true"
OnSelectedIndexChanged="ddlBrands_SelectedIndexChanged"
AppendDataBoundItems="true">
<asp:ListItem Value="" Text="Please select a brand..." />
</asp:DropDownList>
<asp:Panel ID="pModels" runat="server" Visible="false">
Model:
<asp:DropDownList ID="ddlModels" runat="server" AutoPostBack="true"
OnSelectedIndexChanged="ddlModels_SelectedIndexChanged" />
</asp:Panel>
<asp:Panel ID="pButton" runat="server" Visible="false">
<asp:UpdateProgress ID="upMain" runat="server" DisplayAfter="100">
<ProgressTemplate><img src="/Assets/Images/loader.gif" />
</ProgressTemplate>
</asp:UpdateProgress>
<asp:Button ID="btnFilter" runat="server" Text="Filter"
OnClick="btnFilter_Click" />
</asp:Panel>
</ContentTemplate>
</asp:UpdatePanel>
<asp:UpdatePanel ID="upList" runat="server">
<ContentTemplate>
<asp:Repeater ID="rProducts" runat="server">
<ItemTemplate>some code here</ItemTemplate>
</asp:Repeater>
</ContentTemplate>
<Triggers>
<asp:AsyncPostBackTrigger ControlID="btnFilter" EventName="Click" />
</Triggers>
</asp:UpdatePanel>