<p>According to <a href="http://msdn.microsoft.com/en-us/library/bb386454.aspx" rel="noreferrer">Microsoft</a> the FileUpload control is not compatible with an AJAX UpdatePanel. </p>

<p>I am aware that a PostBackTrigger can be added to the submit button of the form like this:</p>

<pre><code>&lt;Triggers&gt;
  &lt;asp:PostBackTrigger ControlID="Button1" /&gt;
&lt;/Triggers&gt;
</code></pre>

<p>The problem is that this forces the form to perform a full post-back which voids out the whole point of using the UpdatePanel in the first place. Is there a workaround to this issue that does not cause the whole page to refresh?</p>

[{'answer_id': 35754, 'author': 'sven', 'author_id': 46, 'author_profile': 'https://Stackoverflow.com/users/46', 'pm_score': 3, 'selected': False, 'text': '<p>I know of a third party component that can do that. It\'s called <a href="http://swfupload.org/" rel="noreferrer">"<em>swfupload</em>"</a> and is free to use and open source, and uses javascript and flash to do the magic.</p>\n\n<p>here is a list of the features they offer:\n(from their site)</p>\n\n<blockquote>\n  <ul>\n  <li>Upload multiple files at once by ctrl/shift-selecting in dialog</li>\n  <li>Javascript callbacks on all events</li>\n  <li>Get file information before upload starts</li>\n  <li>Style upload elements with XHTML and css</li>\n  <li>Display information while files are uploading using HTML</li>\n  <li>No page reloads necessary</li>\n  <li>Works on all platforms/browsers that has Flash support.</li>\n  <li>Degrades gracefully to normal HTML upload form if Flash or javascript is\n  unavailable</li>\n  <li>Control filesize before upload starts</li>\n  <li>Only display chosen filetypes in dialog</li>\n  <li>Queue uploads, remove/add files before starting upload</li>\n  </ul>\n</blockquote>\n\n<p>They also have a <a href="http://www.swfupload.org/documentation/demonstration" rel="noreferrer">demo area</a> where you can play around with their control. That way you can make sure it is exactly what you want.</p>\n\n<p>We used it in one of our projects and it has never failed us so far, so I think this is a safe bet.</p>\n\n<p>oh and here is the download page: <a href="http://code.google.com/p/swfupload/" rel="noreferrer">http://code.google.com/p/swfupload/</a></p>\n'}, {'answer_id': 36859, 'author': 'palotasb', 'author_id': 3063, 'author_profile': 'https://Stackoverflow.com/users/3063', 'pm_score': 2, 'selected': False, 'text': "<p>You can't upload file(s) via <code>AJAX</code> only by reloading a whole <code>HTML</code> document. You should either use <code>iframe</code>s if you prefer pure HTML (this is more common, eg. used by WordPress) or something else like swfupload suggested by Sven.</p>\n"}, {'answer_id': 74904, 'author': 'weffey', 'author_id': 13208, 'author_profile': 'https://Stackoverflow.com/users/13208', 'pm_score': 1, 'selected': False, 'text': '<p>I found this the other day when I ran into the same problem: <a href="http://vinayakshrestha.wordpress.com/2007/03/13/uploading-files-using-aspnet-ajax-extensions/" rel="nofollow noreferrer">http://vinayakshrestha.wordpress.com/2007/03/13/uploading-files-using-aspnet-ajax-extensions/</a>.</p>\n\n<p>For my implementation, I put the iframe in a modal popup and added a button with style="display:none" to handle the closing of the popup.  In the javascript function that watches for the change in the iframe, I added document.getElementById("&lt;%=btnCloseUpload.ClientID%>").click(); for the hidden button.</p>\n'}, {'answer_id': 217722, 'author': 'user10859', 'author_id': 10859, 'author_profile': 'https://Stackoverflow.com/users/10859', 'pm_score': 2, 'selected': False, 'text': '<p>Add this to your button control:</p>\n\n<pre><code>OnClientClick="javascript:document.forms[0].encoding = \'multipart/form-data\';"\n</code></pre>\n\n<p>-or- </p>\n\n<p>Make your page Form tag look like:</p>\n\n<pre><code>&lt;form id="form1" runat="server" enctype="multipart/form-data"&gt;\n</code></pre>\n'}, {'answer_id': 2222808, 'author': 'David Neale', 'author_id': 234645, 'author_profile': 'https://Stackoverflow.com/users/234645', 'pm_score': 1, 'selected': False, 'text': '<p>Try the AJAX AsyncFileUpload. It works well if used in the matter it is intended to be used (handle the UploadedComplete event).</p>\n\n<p><a href="http://www.asp.net/AJAX/AjaxControlToolkit/Samples/AsyncFileUpload/AsyncFileUpload.aspx" rel="nofollow noreferrer">http://www.asp.net/AJAX/AjaxControlToolkit/Samples/AsyncFileUpload/AsyncFileUpload.aspx</a></p>\n'}, {'answer_id': 9537496, 'author': 'Houston77mr', 'author_id': 1245623, 'author_profile': 'https://Stackoverflow.com/users/1245623', 'pm_score': -1, 'selected': False, 'text': '<p>The button that is triggering the upload event needs to have <code>UseSubmitBehavior</code> property set to false:</p>\n\n<pre><code>clsUploadButton.UseSubmitBehavior = False;\n</code></pre>\n'}, {'answer_id': 18716442, 'author': 'Harry Sarshogh', 'author_id': 2031820, 'author_profile': 'https://Stackoverflow.com/users/2031820', 'pm_score': 0, 'selected': False, 'text': '<p>Can use IFrame have "target" attribute which mention to FileUpload Page OR use Jquery example at link\n<a href="https://stackoverflow.com/questions/2909442/how-to-make-asynchronousajax-file-upload-using-iframe">How to make Asynchronous(AJAX) File Upload using iframe?</a></p>\n'}]
['https://Stackoverflow.com/questions/35743', 'https://Stackoverflow.com', 'https://Stackoverflow.com/users/3677/']