title: C# How to know the size of file on a website
body: <p>I want to download a file on a website using C# and show its downloading percentage using progressBar. I know I can use the following code to get the size of a local file, but how can I know the size of file posted on a website?</p>
  
  <pre><code>FileInfo finfo = new FileInfo(strFilePath);
  int length = (int)finfo.Length;</code></pre>