3 Answers, 1 is accepted
Hello Rog,
The AsyncUpload starts uploading the files automatically to the Temporary folder unless the Manual upload is activated. Then, the postback is used to allow the code behind to have access to the files and move the files from the Temporary folder to the Target folder.
With that said, you can use the OnClientFilesUploaded event, that is fired after all the files are uploaded, and trigger the postback programmatically.
Regarding the list of files, you can hide the with CSS:
.RadAsyncUpload ul{
display:none;
}
Regards,
Peter Milchev
Progress Telerik
Pete,
Thanks for the response. I do however have one question.
When looking at the "Events" in the Design View of the AsyncUpload control I only list the following events:
DataBinding
Disposed
FileUploaded
Init
Load
Prerender
Unload
When trying to use the OnClientFilesUploaded event I am getting an error stating
JavaScript runtime error: 'OnClientFilesUploaded' is undefined
Not sure why? I am using telerik version 2019 Q2
Thanks,
Roger
Hello Roger,
The events you have listed below are the available Server-side events of the AsyncUpload, while the the OnClientFilesUploaded event is a Client-side event.
The error that you observe is most probably caused by the fact that the control cannot find a globally accessible function named "OnClientFilesUploaded".
<script>
function OnClientFilesUploadedHandler(sender, args) {
}
</script>
<telerik:RadAsyncUpload runat="server" MultipleFileSelection="Automatic" OnClientFilesUploaded="OnClientFilesUploadedHandler"></telerik:RadAsyncUpload>
Regards,
Peter Milchev
Progress Telerik