如何在ASP.net中显示加载页面指示器?

Duk*_*hoo 2 javascript c# asp.net jquery

我需要在页面加载时显示" 加载 "指示符.我从代码页面后面的其他服务器获取数据并绑定列表视图.我没有使用更新面板我也没有通过ajax获取数据.因此,如果页面需要很长时间才能加载,我怎么能显示"加载"指示符.

提前致谢.

Kri*_*tof 5

您创建一个包含div,其中间有一个加载gif.当您启动ajax请求时,您将显示它(例如使用jquery),当您完成ajax请求时,您将其隐藏.
它可能/应该看起来像这样:
代码显示加载指标:

 $('#busy-holder').show();
Run Code Online (Sandbox Code Playgroud)

div:

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

    </div>
</div>
Run Code Online (Sandbox Code Playgroud)

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;
}
Run Code Online (Sandbox Code Playgroud)