2 asp:updatepanel和2 asp:updateprogress控件

时间:2011-04-20 03:49:38

标签: asp.net updatepanel updateprogress

我正在使用两个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>

2 个答案:

答案 0 :(得分:0)

不完全确定会发生什么,但您可以尝试为更新面板中的下拉列表设置AutoPostback =“true”吗?

答案 1 :(得分:0)