.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Win Surprise Gifts!!!

Top 5 Contributors of the Month
Gaurav Pal
Post New Web Links

Progress Bar - How to ?

Posted By:      Posted Date: May 22, 2011    Points: 0   Category :Windows Application

I'm writing in C# - Windows Forms.


I have a form which has a button and a progress bar. By Clicking on the button it will connect to my backend sqlserver 2008 database and retrive the data then populate it in datagrid view. The whole process takes a certain amount of time which varies.

During the time the windows form is freezing - I want this not to freeze so that i can move it here and there and i want the progress bar to indicate the whole process in bars.


Any suggestions please ?

View Complete Post

More Related Resource Links

.NET Matters: Deserialization Progress, and More


Build a standard progress bar that indicates how much deserialization has completed and how much still remains. Plus, System.Collection.Generics performance.

Stephen Toub

MSDN Magazine December 2006

Cutting Edge: Simplify Task Progress with ASP.NET "Atlas"


Dino Esposito rewrites his task progress bar with the help of ASP.NET "Atlas."

Dino Esposito

MSDN Magazine October 2006

Cutting Edge: Reporting Task Progress With ASP.NET 2.0


The progress bar is great for keeping users informed about the progress of a task. Unfortunately, there's no progress bar element built into ASP.NET, so Dino Esposito solves that problem with his ProgressPanel control.

Dino Esposito

MSDN Magazine September 2006

Advanced Basics: Building a Progress Bar that Doesn't Progress


In many situations, accurately estimating the length of a certain process (copying a large file, loading data from a server, retrieving files from the Internet) would be both difficult and inefficient.

Duncan Mackenzie

MSDN Magazine October 2004

JQuery Progress bar and ASP.net


I am using making application asp.net 2.0. In my page there is Data List which is having two buttons. When user click on the button it is doing some process and taking some time. Due to that user some time click twice and it will make problem in application. So to stop that I wanted to show progress bar until button click process done.
I am using following code 
ASPX Page Code

Progress Bar with Survey


I got the below lireature from http://doc.essentialobjects.com/library/1/eo.web.progressbar.aspx. The only thing I have found this good for is if there is a task or process that you want to show the user the status of how much is completed. In my case I just want to show the user how far along they are in a survey. I am having trouble understanding this so that I can write client side JavaScript API to get this to work and do  what I need to do, which is increase the progress meter and show how far along in the survey the user is. It says to use ProgressBar.setValue(value), but I dont know where to place it in my application, nor what value to pass, to where?  Any help with this is greatly appreciated.

ProgressBar Class

A ProgressBar is a graphical component that provides information about the status of a given task.

For a list of all members of this type, see ProgressBar Members.


How to make the Workflow Status remain "In Progress" when a task is "Rejected"


Hi Sir/Mam,

I have a work flow running on a list, when a task is Rejected at a stage then the Workflow status is set to "Completed". Instead of this I want the Status to remain as "In Progress", so that in future after the modification of the document the Approver may Approve it and then take it to the next stages. This is not possible if the Workflow is set to "Completed".

Can you please suggest an easy way to do this

Thanks in Advance


Cancelling UpdatePanel progress


I have an UpdatePanel that consists of a button and a GridView. The UpdateProgress as shown consists of an image and a "cancel progress" button. The style on the image helps in graying out the controls on the page but still letting the user view those (due to the opacity settings). What is the best way to implement cancelling the progress of loading data into the GridView by clicking the cancel button.

<asp:ScriptManager ID="sm1" runat="server" />
        <asp:UpdateProgress AssociatedUpdatePanelID="upCheckBoxes" ID="upr1" runat="server">
                <div id="container">
                    <img src="images/loading.gif" id="loadingimg" />
	<asp:UpdatePanel ID="upCheckBoxes" runat="server" UpdateMode="Conditional">
	<asp:AsyncPostBackTrigger ControlID="btnSubmit" EventName="Click" /> 
		<script type="text/javascript">   
			Sys.Application.add_load(BindEvents);     //Doing some jquery stuff here

Problem with list controls and update progress template



I have an update panel that surrounds a wizard control which I use in conjunction with a update progress control. Now my update progress control works perfectly, with my animated gif and div tag that lays over my wizard control when the user goes from step to step. However, there is a problem that I am struggling to solve. A number of my steps use controls like list boxes, and when the update progress control fires, the list control is not laying underneath my div an animated gif no matter how high a make my css z-index on the div.

Does anyone have a way of solving this?


Pass activity progress to caller

Hi, I have code activity MyActivity.cs. I create a workflow/XAML which contains MyActivity. My caller application load and executes this XAML. From inside MyActivity.cs, at execution time, I would like to pass progress information back to caller app. This information can just be an integer on basis of which caller app can show a progress bar describing how much activity has been executed.  What is the best way to achieve this in terms of WF? I can do some hacks to pass this information but is there any WF standard way to achieve this? Thanks,  haris

AJAX update panel and update progress controls

I have writtena Crystal reports web application, that prompts ths user for parameters and then apply them and exports the report to a folder as .rpt and then display the report. I prompt the parameters on one screen and then display the report on another page. I have the AJAX update panel and update progress controls in the parameter page. When the user enters the parameters and click on ok, I export the report and then loads the report to a session report document and transfer the user to the second page where the report is displayed. I use the following code to do transfer to the seconds page. I have excluded the report load and parameter assign code here.rpt.ExportToDisk(ExportFormatType.CrystalReport, "c:\reports\testrep.rpt") Session("rpt") = New ReportDocument Session("rpt").load("c:\reports\testrep.rpt") Response.Redirect("show.aspx") In the second page I have the following: rptViewer.reportsource = Session("rpt") My problem is this works one time and then stops working the second. What I found out was it comes to the statement: Response.Redirect("show.aspx") But it does not even load the show.aspx page. It stays on the parameter page. There are no errors displayed. I could not see any errors when I debug the application also. And out of the blue it works

Update progress within a datalist

I have an update panel and then a datalist and then a nested datalist...it looks like this:   <update panel>      <datalist1>            <datalist2>            </datalist2>      </datalist> </updatepanel>   Problem is, within datalist 2, I have some linkbutton's and I'd like to show a progress "gif" (update progress) when the button is clicked.  I can create the update progress, but when you click the button, you get the "gif" shown for every item in the nested datalist.  Anyone know how I can identify where I am in the datalist (which linkbutton) and only show the progress "gif" for that button? Thanks in advance for any help! Mike    

Use update progress control to change image control imageurl

UPDATE: Apologies for the previous formatting error - hopefully the post is now more readable... Hi I have a button with an image control next to it. Before the button is clicked, the image control "ConfirmedStatusImage" shows a "cancel.png" image. When the button has been clicked (and some other code successfully executed), then I change the imageurl for the "theConfirmedStatusImage" to show a "ok.png" image. Quite a bit of time can often pass between clicking the button and the associated code executing, so I have an ajax update progress control that shows a "bluespinner.gif" image while the page is updating after the button click. At the moment, the update progress updating image appears next to the "ConfirmedStatusImage" control. However, I would like to change things so that when the update progress starts, the imageurl of "ConfirmedStatusImage" changes from "cancel.png" to the update progress image (i.e., the "bluespinner.gif"). Then, when the update is complete, then the image should change to the "ok.png" image. My question is: how can I achieve this? As far as I can tell, the update progress control does not have any events that I can hook into. Also, placing the "ConfirmedStatusImage" inside the ProgressTemplate would not work either, as this only displays

Update progress animation

I have an update progress control that I use to overlay an updatepanel. It has an animated gif that is displayed. The animated gif doesn't not work though unless I add system.threading.thread.sleep([seconds]) . Obviously I don't want to do that. Is there something I need to do to get the gif to work or is it just the nature of the beast? Here is the code for the update progress. It is triggered by an update panel that has a control that updates another update panel. <asp:UpdateProgress id="UpdateProgress1" runat="server" AssociatedUpdatePanelID="UpdatePanel2" DisplayAfter="1"> <progresstemplate> <DIV class="LoadingOverlay"></DIV> <DIV class="LoadingMessage">Loading...<BR /><IMG src="../../../helpdesk/img/progress.gif" /> </DIV> </progresstemplate> </asp:UpdateProgress>  

Unable to write anything when Update Progress Close

Hi,Acctually I have done lots of coding on Page_Load of a page which comming from other page. So for that i tried to use ModalPopupExtender. but problem is that its working fine for button but how can i use it for Page_Load.My scenario is:protected void Page_Load(object sender, EventArgs e)    {        PleaseWaitPopup.Show();        //Lots of code and queries;       PleaseWaitPopup.Close();          }  After too much googling i found one solution. which works but still problem is after closing ModalPopupExtender I am unable to write anything on page even i have removed StyleSheet:Current Code is as Follow:<%@ Page Language="C#" AutoEventWireup="true"  CodeFile="Default.aspx.cs" Inherits="_Default" %><%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="asp" %><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head runat="server">    <title></title> <link href="StyleSheet.css" rel="styles
ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  Silverlight  Others  All   

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend