簡體   English   中英

使用C#和asp.net的Web應用程序中的進度欄

[英]Progress bar in web application using C# and asp.net

我的應用程序中需要有2個進度條:

  1. 圓形圖形進度條忙碌指示器)
    • 如頁面[15.1.3]所示,當頁面進行回發和
  2. 確定的進度條
    • 如鏈接[15.1.1]所示,其中顯示了將數據更新或加載到應用程序中使用的網格中時的百分比。

誰能幫助我提供代碼片段,以及如何繼續處理.aspx和.aspx.cs文件以便為我的應用程序獲取這些進度條?

您可以對忙碌指示器使用UpdateProgress控件,這很容易:

   <asp:UpdateProgress ID="UpdateProgress1" runat="server" AssociatedUpdatePanelID="UpdatePanel1" DisplayAfter="0">
       <ProgressTemplate>
           <div>
               <img src="../Resources/Images/indicator.gif" />
               Loading...
           </div>
       </ProgressTemplate>
   </asp:UpdateProgress>

但是進度條將需要更多的工作。 您需要運行一個后台線程來完成工作,然后需要定期回發以檢查會話變量的值,以獲取當前的進度。

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM