如何显示在ASP.net页面加载指标? [英] How to show loading page indicator in ASP.net?

查看:111
本文介绍了如何显示在ASP.net页面加载指标?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我要显示加载时,页面加载指标。我从其他的服务器在code获取数据页背后绑定列表视图。我不使用更新面板无论我通过AJAX获取数据。所以,我怎么能显示加载指示的页面是需要长时间来加载。

I need to show a "loading" indicator when the page is loading. I am getting data from from other servers in code behind page and binding the list view. I am not using update panel neither I am getting data through ajax. So how can I show a "Loading" indicator as the page is taking long time to load.

先谢谢了。

推荐答案

您创建一个在它的中心加载GIF含有股利。
当您启动Ajax请求你展示它(使用jQuery为例)当Ajax请求完成你隐藏它。结果
它可以/应该是这个样子:结果
code,显示加载指示器:

You create a containing div with a loading gif in the center of it. When you start your ajax request you show it (with jquery for example) when the ajax request is done you hide it.
It could/should look something like this :
Code to show the loading indicator :

 $('#busy-holder').show();

DIV:

<div id="busy-holder" style="display: none">
    <div id="busy">

    </div>
</div>

CSS:

#busy
{
    position: fixed;
    left: 50%;
    top: 50%;
    background: transparent url("loader.gif");
    z-index: 1000;
    height: 66px;
    width: 66px;
}

#busy-holder
{
    height:100%;
    width:100%;
    position:fixed;
    left:0;
    top:0;
    display: none;
    filter: alpha(opacity=30);
    filter: progid:DXImageTransform.Microsoft.Alpha(opacity=30);
    opacity:0.3;
    -moz-opacity: 0.30; 
    z-index: 1000;
}

这篇关于如何显示在ASP.net页面加载指标?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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