Difference between AjaxFileUpload and AsyncFileUpload in Asp.Net Ajax Control Tool Kit

Sai Avinash picture Sai Avinash · Mar 11, 2014 · Viewed 20.5k times · Source

I have been learning how to use the different controls that the asp.net ajax control tool kit provides.

I came across two controls that are very confusing to me:

  1. AjaxFileUpload and 2.AsyncFileUpload.

The 1 st control is pretty fine . I understood that AjaxFileUpload uploads the file with out having the post back unlike normal asp.net File Upload Control

But, I was not sure what again is this AsynxFileUpload. I was not able to understand difference between them

Can any one please clear me on this. If possible , any example

Thanks

Answer

meyquel picture meyquel · Mar 11, 2014

AsyncFileUpload - AsyncFileUpload is an ASP.NET AJAX Control that allows you asynchronously upload files to server. The file uploading results can be checked both in the server and client sides.

AjaxFileUpload- AjaxFileUpload is an ASP.NET Ajax control which enables you to upload multiple files to the server asynchronously. When the control is used with a browser which supports the latest features of HTML5 -- such as Microsoft Internet Explorer 10, Mozilla Firefox 9, or Google Chrome 17 -- then the AjaxFileUpload supports displaying file upload progress. The control displays a progress bar as the file is being uploaded.

If a browser does not support the HTML5 File API (for example, Internet Explorer 9) then upload progress is not displayed and a throbber image is displayed instead. In other words, a busy wait image is displayed instead of actual progress.

The AjaxFileUpload control also supports a drag-and-drop interface. You can add multiple files to the AjaxFileUpload upload queue by dragging the files onto the AjaxFileUpload control on a page. Alternatively, you can select multiple files to upload by using the SHIFT key or CTRL key when selecting files with the file upload dialog. These features are not supported by older browsers.

By taking advantage of the AllowedFileTypes property, you can restrict the types of files which can be uploaded with the AjaxFileUpload control. For example, you can prevent any file except image files (files with the extensions jpeg, png, or gif) from being uploaded. By taking advantage of the MaximumNumberOfFiles property, you can limit the number of files which can be uploaded with the control. For example, you can prevent a user from uploading more than 5 files.

http://www.asp.net/ajaxLibrary/AjaxControlToolkitSampleSite/AjaxFileUpload/AjaxFileUpload.aspx http://www.asp.net/ajaxLibrary/AjaxControlToolkitSampleSite/AsyncFileUpload/AsyncFileUpload.aspx