RadControls for ASP.NET AJAX
This tutorial will walk you through creating a Web page that uses RadAsyncUpload control. It shows how to:
1. We start by creating a new page and adding a RadAsyncUpload control to it.
2. Use the Smart Tag of the control to add RadScriptManager on the page:
3. It will automatically register the Telerik.Web.UI.WebResource.axd handler in the web.config file. This handler is used by both RadScriptManager and RadAsyncUpload:
4. Set the TargetFolder property to the folder where you want the files to be automatically uploaded after the postback.
Caution |
|---|
The files are automatically and asynchronously uploaded to the folder specified by the TemporaryFolder property but are copied to the TargetFolder after the postback on the page.
|
By default the TemporaryFolder is set to App_Data / RadUploadTemp folder. The files are uploaded with randomly generated unique names.
CopyASPX
<telerik:RadAsyncUpload ID="RadAsyncUpload1" TargetFolder="uploads" runat="server"></telerik:RadAsyncUpload>
5. Finally, add a button on the page which will postback. Run the application and select a file - you will see the loading image indicating that the file is uploaded asynchronously. During the upload the page is interactive to the user. After clicking on the postback button - the file is saved to the TargetFolder.