4
当我分配AssociatedUpdatePanelId时,选择状态时不显示进度,但当我将其留空时,它会显示进度。为什么设置AssociatedUpdatePanelId时不会触发更新进度?
下面是ASPX标记:
<div>
<asp:ListBox ID="lstStates" runat="server" AutoPostBack="True"
OnSelectedIndexChanged="lstStates_SelectedIndexChanged" SelectionMode="Multiple">
</asp:ListBox>
</div>
<div>
<asp:UpdatePanel ID="UpdatePanel1" runat="server">
<ContentTemplate>
<asp:Panel ID="pnlCounty" runat="server">
<asp:ListBox ID="lstCounties" runat="server" SelectionMode="Multiple">
</asp:ListBox>
</asp:Panel>
</ContentTemplate>
<Triggers>
<asp:AsyncPostBackTrigger ControlID="lstStates" EventName="SelectedIndexChanged" />
</Triggers>
</asp:UpdatePanel>
<asp:UpdateProgress ID="UpdateProgress2" runat="server" DisplayAfter="1"
AssociatedUpdatePanelID="UpdatePanel1">
<ProgressTemplate>
<img src="../images/loader2.gif" />
Loading Counties...
</ProgressTemplate>
</asp:UpdateProgress>
</div>