How can I make the Telerik progress bar work?

Posted by Darien Fawkes on Stack Overflow See other posts from Stack Overflow or by Darien Fawkes
Published on 2011-06-06T12:25:57Z Indexed on 2012/09/22 21:38 UTC
Read the original article Hit count: 498

Filed under:
|
|

I have a Telerik progress bar in my project:

<telerik:RadProgressManager ID="RadProgressManager" Runat="server" />
<telerik:RadProgressArea ID="RadProgressArea" Runat="server"></telerik:RadProgressArea>   
<asp:button id="Button1" runat="server" text="Submit" />

On button click I try to run this method:

private void MethodWhichUpdatesTheProgressContext(UploadedFile file, int countFile)
{
     const int total = 100;
     RadProgressContext ProgressContex = RadProgressContext.Current;
     ProgressContex.SecondaryTotal = "100";

     for (int i = 0; i < total; i++)
     {
         ProgressContex.CurrentOperationText = "Uploading zip file percentage " + i.ToString();                

         if (!Response.IsClientConnected)
         {                    
             break;
         }

         System.Threading.Thread.Sleep(100);
     }
}

Project builds without any errors but progress doesn't change. How do I properly fire the progress bar animation? If I put this progress bar on control, it can effect this?

© Stack Overflow or respective owner

Related posts about c#

Related posts about ASP.NET