Solved

Progress Bar VS 2012 Web Form

Posted on 2013-12-12
10
760 Views
Last Modified: 2013-12-22
The following article describes how to implement a progress bar on a Windows form.

http://www.c-sharpcorner.com/UploadFile/mahesh/WorkingwithProgressBarinCSharp11302005045625AM/WorkingwithProgressBarinCSharp.aspx

Is there an article that describes  how to implement a progress bar on a Web form in asp.net 4.0 and C#?

Thanks,
0
Comment
Question by:Dovberman
  • 5
  • 5
10 Comments
 
LVL 27

Accepted Solution

by:
Chinmay Patel earned 300 total points
ID: 39714685
for a modern technique look here(this is something I would do). Even if you are not displaying file upload progress this is something you can easily use.
http://www.dotnetbips.com/articles/859d32c8-945d-4e5d-8c89-775388598f62.aspx

also here is another way to implement it:
http://www.aspdotnet-suresh.com/2010/10/how-to-show-progressbar-during.html

if you are willing to create a control on your own then look here:

http://www.beansoftware.com/ASP.NET-Tutorials/ProgressBar-User-Control.aspx
0
 

Author Comment

by:Dovberman
ID: 39715521
These seem more complex than the progress bar of VB.

I will try them and give feedback.

Thanks,
0
 

Author Comment

by:Dovberman
ID: 39715568
I am trying a label control whose text is incremented each time a loop counter reaches 400.

int intProgressIncrement = 0;

for (int i = 0; i <=8000 ; i++)
      Do Stuff
      intProgressIncrement++
      if (  intProgressIncrement ==400)
       {
              lblProgress.Text = lblProgress.Text + "->";
              intProgressIncrement = 0;
       }

//lblProgress.Text  will look like "->->->->" etc.
0
 
LVL 27

Assisted Solution

by:Chinmay Patel
Chinmay Patel earned 300 total points
ID: 39715805
Any specific issue you are facing? You could use AJAX and a WebMethod polling mechanism.

Check this simple article:
http://blogs.microsoft.co.il/gilf/2008/10/04/aspnet-ajax-pagemethods/

and to understand the concept of Pagemethod in detail:
http://encosia.com/why-do-aspnet-ajax-page-methods-have-to-be-static/
0
 

Author Comment

by:Dovberman
ID: 39718689
The label text should display another "->"

There is no error, but the label text does not get updated.
   
      for (int i = 0; i <=8000 ; i++)
       {
                intProgress++;
               
                if (intProgress == intProgressIncrement)  // increment is 300
                {
                    lblProgress.Text = lblProgress.Text + strProgressChar;  // Text is not updated
                    intProgress = 0;
                }

        }  // End  while ((line = sr.ReadLine()) != null)


Do I need a delay?
0
Maximize Your Threat Intelligence Reporting

Reporting is one of the most important and least talked about aspects of a world-class threat intelligence program. Here’s how to do it right.

 
LVL 27

Expert Comment

by:Chinmay Patel
ID: 39719540
Please post both client and sever side code related to progress bar.
0
 

Author Comment

by:Dovberman
ID: 39719557
There is no progress bar.  I am using a label control.
0
 
LVL 27

Expert Comment

by:Chinmay Patel
ID: 39720662
Ok. Post your client side code markup and script as well as server side code especially the page method.
0
 

Author Closing Comment

by:Dovberman
ID: 39731227
Thank you
0
 
LVL 27

Expert Comment

by:Chinmay Patel
ID: 39735480
Glad I could help. :)
0

Featured Post

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

For a while now I'v been searching for a circular progress control, much like the one you get when first starting your Silverlight application. I found a couple that were written in WPF and there were a few written in Silverlight, but all appeared o…
For most people, the WrapPanel seems like a magic when they switch from WinForms to WPF. Most of us will think that the code that is used to write a control like that would be difficult. However, most of the work is done by the WPF engine, and the W…
This is Part 3 in a 3-part series on Experts Exchange to discuss error handling in VBA code written for Excel. Part 1 of this series discussed basic error handling code using VBA. http://www.experts-exchange.com/videos/1478/Excel-Error-Handlin…
When you create an app prototype with Adobe XD, you can insert system screens -- sharing or Control Center, for example -- with just a few clicks. This video shows you how. You can take the full course on Experts Exchange at http://bit.ly/XDcourse.

708 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

13 Experts available now in Live!

Get 1:1 Help Now