stack_pointer is EXTINCT
stack_pointer is EXTINCT

Reputation: 2403

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

I need to have 2 progress bars in my application:

  1. Circular graphical progress bar (busy indicator)
    • as shown in the link [15.1.3] when the page does a postback and
  2. A determinate progress bar
    • as shown in the link [15.1.1] with showing a percentage when I update or load data into the grid which I use in my application.

Can anyone help me with code snippets and how I can proceed with my .aspx and .aspx.cs files in order to obtain these progress bars for my application?

Upvotes: 0

Views: 15526

Answers (1)

Daniel
Daniel

Reputation: 11064

You can use an UpdateProgress control for the busy indicator, which is very easy:

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

But a progress bar is going to require a bit more work. You'll need to run a background thread to do the work, and you'll then need to periodically post back to check the value of, say, session variable to get your current progress.

Upvotes: 1

Related Questions