我为他们使用了两个 asp:updatepanel 和 2 asp:updateprogress。当我从不使用 AssociatedUpdatePanelID 时,更新进度正确显示,但如果我使用 AssociatedUpdatePanelID,进度条永远不会显示。
<asp:UpdateProgress AssociatedUpdatePanelID="upMainPracticeCountry" runat="server" ID="UpdateProgress1">
<ProgressTemplate>
<img src="images/loading.gif" alt="loading..." /></ProgressTemplate>
</asp:UpdateProgress>
<asp:UpdatePanel ID="upMainPracticeCountry" runat="server">
<Triggers>
<asp:AsyncPostBackTrigger ControlID="ddlMainPracticeCountry" EventName="SelectedIndexChanged" />
</Triggers>
<ContentTemplate>
<asp:DropDownList ID="ddlMainPracticeState" runat="server">
</asp:DropDownList>
</ContentTemplate>
</asp:UpdatePanel>
另一个更新面板是
<asp:UpdateProgress runat="server" ID="up2" AssociatedUpdatePanelID="upPostalCountry">
<ProgressTemplate>
<img src="images/loading.gif" alt="loading..." /></ProgressTemplate>
</asp:UpdateProgress>
<asp:UpdatePanel ID="upPostalCountry" runat="server" UpdateMode="Conditional">
<Triggers>
<asp:AsyncPostBackTrigger ControlID="ddlPostalCountry" EventName="SelectedIndexChanged" />
</Triggers>
<ContentTemplate>
<asp:DropDownList ID="ddlPostalState" runat="server">
</asp:DropDownList>
</ContentTemplate>
</asp:UpdatePanel>