This topic shows how to use the Upload UI component in an ASP.NET MVC application.
should be defined *after* all other UI components in the page.
If you create the components on the client-side and do not use the MVC extensions,
this help topic (Step 4 - Register Scripts)
Before proceeding make sure that:
You have all the required components installed.
Make sure that your ASP.NET MVC project refers the Telerik.Web.Mvc.dll
assembly and you have a ScriptRegistrar and a StyleSheetRegistrar defined in your application (either in the master page
or in the view where you are going to use the Upload UI component).
The Upload component uses progressive enhancement to deliver better file uploading experience for both end-users and developers.
It supports both asynchronous and synchronous uploading in all current browsers.
In addition to the baseline functionality, the Upload uses the latest standard developments
to deliver advanced features such as drag & drop support and progress tracking
in modern browsers.
The following example shows how to setup an asynchronous upload that saves the uploaded files in the App_Data folder.
The default template for a new ASP.NET MVC application is used.
Declare the control in the Index view.
.Async(async => async
The Name is used to specify the unique name of the Upload component.
It is used to set the id and name HTML attributes.
Setting the name is mandatory and exception would be thrown otherwise.
The Save action that will receive the uploaded files is configured in the Async section.
Implement the Save controller action.
public ActionResult Save(IEnumerable<HttpPostedFileBase> attachments)
foreach (var file in attachments)
var fileName = Path.GetFileName(file.FileName);
var destinationPath = Path.Combine(Server.MapPath("~/App_Data"), fileName);
Build and run the application. The uploaded files will appear in the App_Data folder.