Asynchronous file upload control lets you upload files asynchronously. You can check the uploaded files both at client and server side.

There are many useful properties introduced in asynchronous file upload control like Complete back color, error back color, file content, filename, OnClientUploadComplete and lot more.

You can learn more in my previous parts here,

Here is the list of useful properties.

We will discuss each property with examples for better understanding later in this article.

As an initial approach we will now place the code of async file upload control and check its output.

  1. <ajaxToolkit:AsyncFileUpload OnUploadedComplete="AsyncFileUpload1_UploadedComplete"
  2. runat="server"
  3. ID="AsyncFileUpload1" Width="400px" UploaderStyle="Modern"
  4. UploadingBackColor="#CCFFFF" ThrobberID="myThrobber" />
  5. protected void AsyncFileUpload1_UploadedComplete(object sender, AjaxControlToolkit.AsyncFileUploadEventArgs e)
  6. {
  7. string fileNametoupload = Server.MapPath("~/Documents/") + e.FileName.ToString();
  8. AsyncFileUpload1.SaveAs(fileNametoupload);
  9. }
Output



Let’s see in detail about properties, events and methods of the control.

Events

Properties