This is a migrated thread and some comments may be shown as answers.

Client-side cloning of RadAsynUpload - Help please!

1 Answer 17 Views
AsyncUpload
This is a migrated thread and some comments may be shown as answers.
Will
Top achievements
Rank 1
Will asked on 29 Jun 2016, 09:51 AM

I've created a one page website that relies on cloning sections of the DOM to generate new subpages. Initially there is an instance of RadAsyncUpload in the page, generated server side on page load. but I need to be able to add further instances of RadAsyncUpload without doing a postback. 

I've cloned the relevant section of the DOM (generating unique IDs for each element), and registered the new RadAsyncUpload element thus:  Sys.Application.add_init(function() {
    $create(Telerik.Web.UI.RadAsyncUpload, {... etc

This succesfully creates an uploader control in the form, which uploads files to the correct temporary location, and when I finally do a postback to submit the data to the server, the RadAsyncUpload control appears correctly in the Page.Controls collection, but the uploadedFiles collection is empty for the cloned control.

Can anyone tell me how the link between the control and the temporary file is managed on postback, and if there is a way to achieve my goal of cloning a RadAsyncUpload control without doing a postback?

 

Many thanks

 

Will

1 Answer, 1 is accepted

Sort by
0
Veselin Tsvetanov
Telerik team
answered on 04 Jul 2016, 06:35 AM
Hi Will,

The Telerik ASP.NET AJAX controls have not been designed for such an initialization approach and are not guaranteed to work in this case. However, to validate your approach we will need the mark-up declaration of the initial RadAsyncUpload, the cloning logic you are using, the way you generate unique ID for the cloned upload and the full code from your Sys.Application.add_init() function.

Regards,
Veselin Tsvetanov
Telerik
Do you need help with upgrading your ASP.NET AJAX, WPF or WinForms projects? Check the Telerik API Analyzer and share your thoughts.
Tags
AsyncUpload
Asked by
Will
Top achievements
Rank 1
Answers by
Veselin Tsvetanov
Telerik team
Share this question
or