title: How to get image width and height uploaded using ajaxfileupload asp.net
body: <p>I think ajaxcontroltoolkit:ajaxfileupload has too many bugs and wane. since I'm using this component frequently in my projects, I overcome to many serious disturbing bugs and functionality of this control.
  Now, I seriously need to get uploaded image width and height using ajaxfileupload before I save it to check either width or height are correct and based on retrieved information, informing users in case of image width and height are not compatible and then prevent the process to go further and save the picture.
  Any Ideas please?!</p>
  
  <p>HTML Side:</p>
  
  <pre><code>&lt;asp:AjaxFileUpload ID="AjaxFileUpload1" runat="server"
          onuploadcomplete="AjaxFileUpload1_UploadComplete" ThrobberID="myThrobber" MaximumNumberOfFiles="1" AllowedFileTypes="jpg,jpeg"/&gt;
  </code></pre>
  
  <p>Behind Code:</p>
  
  <pre><code>protected void AjaxFileUpload1_UploadComplete(object sender, AjaxControlToolkit.AjaxFileUploadEventArgs e)
  {
      string filePath = "~/upload/" + e.FileName;
      AjaxFileUpload1.SaveAs(filePath);
  
  }
  </code></pre>