在Web应用程序中显示等待消息 [英] Display waiting message in web application

查看:69
本文介绍了在Web应用程序中显示等待消息的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述




当数据从后端拉到excel表时需要显示正在加载...消息,这需要超过5分钟并且一旦完成数据提取从屏幕上删除此消息。

我可以在JQuery的帮助下点击按钮显示消息。

Hi
I have to display "Loading..." message when the data is pulled from backend to excel sheet which takes more than 5 min and once data fetching is done have to remove this message from screen.
I m able to show message on click of the button with the help of JQuery.

<asp:Button ID="btnDownloadReport" Visible="true" runat="server" Text="Download" OnClientClick="$('.loading').show();" OnClick="btnDownloadReport_OnClick"/>

This is the DIV tag that is displaying the message.
<div class="loading" id="main" align="center"   runat="server">
<br />    
Loading. Please wait.<br />
<br />



现在问题是我在提取数据后无法隐藏此消息。

Any在拉取数据的方法之后编写的代码没有被执行。


Now the problem is I m unable to hide this message once the data is fetched.
Any code written after the method that pulls the data is not getting executed.

protected void btnDownloadReport_OnClick(object sender, EventArgs e)
{
    GetData();
    // any code written here is not getting executed
}



请帮帮我。它的紧迫性。谢谢。


Please help me. Its little urgent. Thanks.

推荐答案

('。loading')。show(); < span class =code-attribute> OnClick = btnDownloadReport_OnClick / >

这是显示消息的DIV代码。
< div class = loading id = main align = center runat = 服务器 >
< br / >
正在加载。请稍候。< br / >
< < span class =code-leadattribute> br / >
('.loading').show();" OnClick="btnDownloadReport_OnClick"/> This is the DIV tag that is displaying the message. <div class="loading" id="main" align="center" runat="server"> <br /> Loading. Please wait.<br /> <br />



现在问题是我在提取数据后无法隐藏此消息。

Any在拉取数据的方法之后编写的代码没有被执行。


Now the problem is I m unable to hide this message once the data is fetched.
Any code written after the method that pulls the data is not getting executed.

protected void btnDownloadReport_OnClick(object sender, EventArgs e)
{
    GetData();
    // any code written here is not getting executed
}



请帮帮我。它的紧迫性。谢谢。


Please help me. Its little urgent. Thanks.


使用脚本管理器



use script manager

ScriptManager.RegisterStartupScript(this, typeof(string), "script",
 "


(''。loading'')。hide();,true);
(''.loading'').hide();", true);


这篇关于在Web应用程序中显示等待消息的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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