title: File Upload doesn't work in a page with Ajax Update Panel
body: <p>I am using Ajax File Upload control in ASP.NET 4 using c#. The same page has an update panel too but the upload control is not inside the update panel. The upload control is outside of the update panel.</p>
  
  <p>The update panel has a captcha image and submit button which is <a href="https://stackoverflow.com/questions/7259587/imageurl-doesnt-work-inside-update-panel">described here too</a>. The submit button inside contains code for saving the file from upload control.</p>
  
  <p>The problem is that when user has browsed the fife to be uploaded using upload control and then enters a wrong captcha value and submits, then a new captcha image is given asynchronously to the user for entry. Now the upload control still shows the path in the upload bar for the file, but on the programming side it does not detects the file.</p>
  
  <p>The submit button code:</p>
  
  <pre><code>if (AsyncFileUpload.HasFile)
  {
    // upload logic and other stuff
  }
  else
  {
    // lblShow.Text = "There is no file to be uploaded";
  }
  </code></pre>
  
  <p>The above code for example executes the else part to say "There is no file to be uploaded". The page still hasn't refreshed totally and the file upload control has the path of the file displayed. Kindly help me with this problem.</p>