George_Fal 2012-01-25 10:49 采纳率: 0%
浏览 15

ajax进度栏不起作用?

I am trying to present a ajax progress bar when a delete button is clicked. This delete button will do things and will take time to process.. The delete button is within a repeater. The code is below:

<asp:UpdatePanel runat="server" ID="upDatePanel" UpdateMode="Conditional">
                <ContentTemplate>
                <asp:UpdateProgress runat="server" ID="UpdateProgress1" DynamicLayout="false" AssociatedUpdatePanelID="upDatePanel">                            
                <ProgressTemplate>                                
                <img id="Img1" runat="Server" src="~/Images/ajax-loader.gif" height="50" width="50"  alt=""/>                            
                 </ProgressTemplate>                     
                 </asp:UpdateProgress>

                    <asp:Repeater ID="rptWork" runat="server" OnItemDataBound="rptWork_ItemDataBound">
                            <ItemTemplate>
                            <tr>
                                <td>
                                    <asp:LinkButton ID="btnDelete" OnClick="btnDelete_Click"  Text="Delete" runat="server" />
                                </td>
                            </tr>
                        </ItemTemplate>
                        <AlternatingItemTemplate>
                            <tr>

                                <td>
                                    <asp:LinkButton ID="btnDelete" OnClick="btnDelete_Click"  Text="Delete" runat="server"/>
                                </td>
                            </tr>
                        </AlternatingItemTemplate>
                        <FooterTemplate>
                            </table>
                        </FooterTemplate>
                    </asp:Repeater>
                </ContentTemplate>
            </asp:UpdatePanel>

I have put in a Thread.Sleep behind the delete button so when user clicks the progress bar appears however the process time takes abit longer. How can i make the progress bar stay on screen until the process is fully complete?

  • 写回答

1条回答 默认 最新

  • weixin_33682790 2012-01-25 11:35
    关注

    Try changing the UpdateMode="Always" to see if your getting page updates.

    If you use conditional you will have to call Update yourself on the panel (not sure if your doing this??)

    评论

报告相同问题?

悬赏问题

  • ¥50 易语言把MYSQL数据库中的数据添加至组合框
  • ¥20 求数据集和代码#有偿答复
  • ¥15 关于下拉菜单选项关联的问题
  • ¥20 java-OJ-健康体检
  • ¥15 rs485的上拉下拉,不会对a-b<-200mv有影响吗,就是接受时,对判断逻辑0有影响吗
  • ¥15 使用phpstudy在云服务器上搭建个人网站
  • ¥15 应该如何判断含间隙的曲柄摇杆机构,轴与轴承是否发生了碰撞?
  • ¥15 vue3+express部署到nginx
  • ¥20 搭建pt1000三线制高精度测温电路
  • ¥15 使用Jdk8自带的算法,和Jdk11自带的加密结果会一样吗,不一样的话有什么解决方案,Jdk不能升级的情况