更新进度应显示在屏幕上或显示 [英] Update Progress should be on screen or shown

查看:72
本文介绍了更新进度应显示在屏幕上或显示的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用带有更新面板的timer_Tick以及updateprogress

在timer_tick的帮助下,我可以执行功能直到40秒(根据我的时间).我的问题是,除非time_tick事件正在进行,否则应该显示我的更新进度.现在它消失了

这是我的伪代码

I am using timer_Tick with update panel and also updateprogress

By the help of timer_tick I am able to execute function till 40 second(according to my time).My problem is Unless time_tick event is in progress my update progress should be shown .Right now it get disappeared

here is my Pseudo code

<cc1:ToolkitScriptManager ID="ToolkitScriptManager1" runat="server">
    </cc1:ToolkitScriptManager>
    <asp:Timer runat="server" id="timer" Interval="5000" OnTick="timer_Tick">
    </asp:Timer>
    <asp:UpdatePanel runat="server" id="updatepanelmain">
        <triggers>
           <asp:AsyncPostBackTrigger ControlID="timer" EventName="Tick" />
    </triggers>
        <contenttemplate>
<asp:UpdateProgress id="up_prgs" runat="server" AssociatedUpdatePanelID="updatepanelmain">
            <progresstemplate>
            <img src="../../../../../ProgressBar.gif" />
         </progresstemplate>
        </asp:UpdateProgress>
    </contenttemplate>

 </asp:UpdatePanel>

推荐答案

尝试将UpdateProgress保留在updatepanel之外.
Try keeping the UpdateProgress outside your updatepanel.


您不需要UpdatePanel或ASP. NET Timer为此.

使用JavaScript显示/隐藏进度图像和setTimeout
You don''t need UpdatePanel or ASP.NET Timer to do this.

Use JavaScript to show/hide the progress image and setTimeout


这篇关于更新进度应显示在屏幕上或显示的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆