title: First time implementing telerik RadUpload control
body: <p>I am implementing telerik RadUpload in my asp.net web application.I added corresponding the handler and module entries in web.config.</p>
  
  <pre><code>&lt;add path="Telerik.RadUploadProgressHandler.ashx"
     type="Telerik.Web.UI.RadUploadProgressHandler" verb="*" validate="false" /&gt;
  &lt;add name="RadUploadModule"
     type="Telerik.Web.UI.RadUploadHttpModule" /&gt;
  </code></pre>
  
  <p>I have a functionality where I need to upload excel file and need to see the progress bar while uploading until it completes 100%.</p>
  
  <p>PROBLEM: I am wondering how to capture the percentage of file uploaded and show it in progressarea.</p>
  
  <p>MY CODE (Button_Click):</p>
  
  <pre><code>    Const total As Integer = 100
  
          Dim progress As RadProgressContext = RadProgressContext.Current
          progress.Speed = "N/A"
          Dim files As UploadedFileCollection = RadUpload1.UploadedFiles
          Dim up As RadUpload = RadUpload1
          If files IsNot Nothing AndAlso 0 &lt;&gt; files.Count Then
              For i As Integer = 0 To total - 1
               progress("SecondaryTotal") = total.ToString()
                  progress("SecondaryValue") = i.ToString()
                  progress("SecondaryPercent") = i.ToString()
                  progress("CurrentOperationText") = files(0).GetName() &amp; " is being processed..."
  
              If Not Response.IsClientConnected Then
                        Exit For
              End If
              progress.TimeEstimated = (total - i) * 100
  
              ---------ACTUAL UPLOAD FUNCTIONALITY HERE----------
               objUpload.CreateBulkUploadRequest(bytes)
  
             Next
          End If
  
  Private Sub CreateBulkUploadRequest(bytes)
  
       StoreDocumentinImageServer(bytes)
  
  End Sub
  
   Public Function StoreDocumentinImageServer(ByVal PostData As Byte()) As Integer
  
          Try
  
              Dim req As HttpWebRequest
              Dim resp As HttpWebResponse
              Dim postStream As Stream
              Dim respStream As StreamReader
              Dim Url As String
              Dim response As String = String.Empty
              Dim ImageId As Integer = 0
              Dim qryString As New StringBuilder("?fileSize=")
              qryString.Append(PostData.Length)
              qryString.Append("&amp;userId=" + RequestedBy.ToString)
              qryString.Append("&amp;applicationName=" + RequestType.ToString)
              qryString.Append("&amp;imageName=" + FileName)
              qryString.Append("&amp;mode=Insert")
              Url = ImageServiceUrl + qryString.ToString
              req = CType(WebRequest.Create(Url), HttpWebRequest)
              req.Method = "POST"
              req.ContentType = contenttype
              req.KeepAlive = True
              req.ContentLength = PostData.Length
              postStream = req.GetRequestStream()
              postStream.Write(PostData, 0, PostData.Length)
              resp = CType(req.GetResponse(), HttpWebResponse)
              respStream = New StreamReader(resp.GetResponseStream(), Encoding.Default)
              response = respStream.ReadToEnd()
              respStream.Close()
              resp.Close()
  
          Catch ex As Exception
              Throw ex
          End Try
      End Function
  </code></pre>
  
  <p>PROBLEM---- Now <code>CreateBulkUploadRequest()</code> method is Synchronous , it will take 10 min to upload and finally come out of the method execution. Now mean while how would I update the progress area and percentage of file upload status.</p>
  
  <p>My biggest problem is CreateBulkUploadRequest() is in the loop of progress bar update code.
  so it calls as many times it is trying to update the progress area.</p>
  
  <p>AM I DOING CORRECT ????????</p>
  
  <p>Please Let me know If my question is not clear.</p>
  
  <p>Looking forward for any suggestions.</p>