下拉列表 updateprogress 和 updatepanel 的问题

发布于 2024-08-14 18:56:14 字数 1171 浏览 4 评论 0原文

更新进度不显示 gif。如果下拉列表位于 updatepanel 内部且没有触发器,则它可以工作。有什么想法吗?

    <asp:DropDownList ID="DropDownList1" runat="server" AutoPostBack="true" onselectedindexchanged="DropDownList1_SelectedIndexChanged">
    </asp:DropDownList>
    <asp:UpdateProgress ID="UpdateProgress1" AssociatedUpdatePanelID="UpdatePanel1" runat="server" DisplayAfter="0">
        <ProgressTemplate>
            <div id="IMGDIV" align="center" valign="middle" runat="server" style="position: absolute;left: 52%;top: 61%;visibility:visible;vertical-align:middle; background-color:Transparent">
                <img src="../App_Themes/Default/images/27-1.gif" />
            </div>
        </ProgressTemplate>            
    </asp:UpdateProgress>
    <asp:UpdatePanel ID="UpdatePanel1" runat="server">
        <ContentTemplate>
            <cc1:Chartlet ID="Chartlet1" runat="server" />
        </ContentTemplate>
        <Triggers>
            <asp:AsyncPostBackTrigger ControlID="DropDownList1" EventName="selectedindexchanged" />
        </Triggers>
    </asp:UpdatePanel>

The updateprogress doesnt show the gif. If the dropdownlist is inside updatepanel without trigger, it works. Any idea?

    <asp:DropDownList ID="DropDownList1" runat="server" AutoPostBack="true" onselectedindexchanged="DropDownList1_SelectedIndexChanged">
    </asp:DropDownList>
    <asp:UpdateProgress ID="UpdateProgress1" AssociatedUpdatePanelID="UpdatePanel1" runat="server" DisplayAfter="0">
        <ProgressTemplate>
            <div id="IMGDIV" align="center" valign="middle" runat="server" style="position: absolute;left: 52%;top: 61%;visibility:visible;vertical-align:middle; background-color:Transparent">
                <img src="../App_Themes/Default/images/27-1.gif" />
            </div>
        </ProgressTemplate>            
    </asp:UpdateProgress>
    <asp:UpdatePanel ID="UpdatePanel1" runat="server">
        <ContentTemplate>
            <cc1:Chartlet ID="Chartlet1" runat="server" />
        </ContentTemplate>
        <Triggers>
            <asp:AsyncPostBackTrigger ControlID="DropDownList1" EventName="selectedindexchanged" />
        </Triggers>
    </asp:UpdatePanel>

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(3

披肩女神 2024-08-21 18:56:14

根据设计,UpdatePanel 的外部触发器不会触发关联的 UpdateProgress,因为启用 UpdateProgress 控件的实现会在控件层次结构中搜索调用控件;外部触发器不会出现在控制层次结构中。

我在这里找到了答案:Updateprogessbar is not work whensetting AssociatedUpdatePanelID?

所以我只需删除:AssociatedUpdatePanelID="UpdatePanel1"

By Design External triggers for an UpdatePanel do not fire an associated UpdateProgress, since the implementation of enabling the UpdateProgress control searches the control hierarchy for the calling control; an external trigger will not be present in the control hierarchy.

I found the answer here: Updateprogessbar is not working when Setting AssociatedUpdatePanelID?.

So I had just to delete: AssociatedUpdatePanelID="UpdatePanel1"

情绪少女 2024-08-21 18:56:14

我也有同样的问题。

只需从 UpdateProgress 中删除以下属性:
AssociatedUpdatePanelID="UpdatePanel1"

I had the same problem.

Just remove the following property from your UpdateProgress:
AssociatedUpdatePanelID="UpdatePanel1"

也只是曾经 2024-08-21 18:56:14

我希望你不是在谈论“gif动画”。如果您使用 IE,则在设计时在 aspx/ascx 中指定的 gif 动画中会出现问题。我使用 类似 blockUI 的插件,它在运行时添加 gif

I hope you are not talking about "gif animation". If you are using IE, it has problems in animating the gifs which are specified at aspx/ascx at design time. I use a plugin like blockUI, which adds the gif at run time

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文