title: How to check size of image from upload files control before I save it to the server?
body: <p>I have file upload control in ASP.NET C#. I need to check if image that user would like to upload is smaller than 2Mb and then I would like to save it on server. 
  I know that after adding a photo I can use such construction:</p>
  
  <blockquote>
  <pre><code>fileUpload.SaveAs(image.jpg);
  var fileLength = new FileInfo(image.jpg).Length;
  </code></pre>
  </blockquote>
  
  <p>but what if I need to check the size of photo before I save it?</p>