2

ページの読み込み中に「読み込み中」インジケーターを表示する必要があります。コードビハインドページで他のサーバーからデータを取得し、リストビューをバインドしています。更新パネルを使用しておらず、ajax からデータを取得していません。ページの読み込みに時間がかかるため、「読み込み中」インジケーターを表示するにはどうすればよいですか。

前もって感謝します。

4

1 に答える 1

5

中央に読み込み中の gif を含む div を作成します。ajax リクエストを開始すると、(たとえば jquery を使用して) 表示され、ajax リクエストが完了すると非表示になります。
次のようになる可能性があります/する必要があります:
ローディングインジケータを表示するコード:

 $('#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;
}
于 2012-05-11T09:02:24.947 に答える