title: Tracking upload progress of WebClient
body: <p>So I am currently uploading files via a php script on my webserver using the following code:</p>
  
  <pre><code>string file = "dp.jpg";
  
  System.Net.WebClient Client = new System.Net.WebClient();
  Client.Headers.Add("Content-Type", "binary/octet-stream");
  byte[] result = Client.UploadFile("http://localhost/upload.php", "POST", file);
  
  String response = System.Text.Encoding.UTF8.GetString(result, 0, result.Length);
  </code></pre>
  
  <p>What I want to know is how would I use this, or a different method to track how much it has uploaded and display it on a progress bar?</p>
  
  <p>Thanks.</p>