I am using an upload control:
with an UpdatePanel:
After uploading a file (or files), the UpdatePanel is updated, but the RadAsyncUpload's upload button no longer works. The textbox portion of the upload section is also now a regular textbox (previously clicking it triggered a File dialog). Is there any javascript I need to run after the UpdatePanel's AJAX response to fix the Upload control?
<
telerik:RadAsyncUpload
runat
=
"server"
ID
=
"uxUpload"
OnClientFileUploaded
=
"clientFileUploaded"
MultipleFileSelection
=
"Automatic"
TemporaryFolder
=
"~/App_Data/TemporaryFileUpload"
Skin
=
""
OnFileUploaded
=
"uxUpload_FileUploaded"
DropZones
=
".uploading-section"
>
</
telerik:RadAsyncUpload
>
with an UpdatePanel:
<
asp:UpdatePanel
runat
=
"server"
ID
=
"UpdatePanel1"
ChildrenAsTriggers
=
"true"
UpdateMode
=
"Conditional"
>
<
Triggers
>
<
asp:AsyncPostBackTrigger
ControlID
=
"uxUpload"
EventName
=
"FileUploaded"
/>
</
Triggers
>
<
ContentTemplate
>
stuff
</
ContentTemplate
>
</
asp:UpdatePanel
>
After uploading a file (or files), the UpdatePanel is updated, but the RadAsyncUpload's upload button no longer works. The textbox portion of the upload section is also now a regular textbox (previously clicking it triggered a File dialog). Is there any javascript I need to run after the UpdatePanel's AJAX response to fix the Upload control?
6 Answers, 1 is accepted
0
Hi Dave,
It seems that similar question has already been discussed in this forum post. Please test the suggested solution.
Regards,
Hristo Valyavicharski
Telerik
It seems that similar question has already been discussed in this forum post. Please test the suggested solution.
Regards,
Hristo Valyavicharski
Telerik
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to the blog feed now.
0

Dave
Top achievements
Rank 1
answered on 24 Sep 2013, 06:53 PM
Hi Hristo,
Unfortunately my code does not use a separate button. I also forgot to include the javascript code to automatically postback after the user uploads a file (through drag+drop or browse):
Otherwise I do use an AsyncPostBackTrigger. Seems like no matter what I do, the Upload control's Browse button only works once.
Unfortunately my code does not use a separate button. I also forgot to include the javascript code to automatically postback after the user uploads a file (through drag+drop or browse):
function
clientFileUploaded(sender, args) {
__doPostBack(
'<%= this.uxUpload.ClientID %>'
,
''
);
}
Otherwise I do use an AsyncPostBackTrigger. Seems like no matter what I do, the Upload control's Browse button only works once.
0

Dave
Top achievements
Rank 1
answered on 24 Sep 2013, 08:10 PM
I found that the "initialize()" function will reset the Upload control and let the browse button work again, but it also has the side effect of causing the drag+drop to double upload the files dragged.
0
Hi Dave,
Regards,
Hristo Valyavicharski
Telerik
After the uxUpload_FileUploaded event was fired, the RadAsyncUpload must be updated from the server. This will happen only if the RadAsyncUpload is inside the Content Template of the update panel.
<script type=
"text/javascript"
>
function
clientFileUploaded(sender, args) {
__doPostBack(
'<%= this.uxUpload.ClientID %>'
,
''
);
}
</script>
<
asp:UpdatePanel
runat
=
"server"
ID
=
"UpdatePanel1"
ChildrenAsTriggers
=
"true"
UpdateMode
=
"Conditional"
>
<
ContentTemplate
>
stuff
<
telerik:RadAsyncUpload
runat
=
"server"
ID
=
"uxUpload"
OnClientFileUploaded
=
"clientFileUploaded"
MultipleFileSelection
=
"Automatic"
Skin
=
"Silk"
OnFileUploaded
=
"uxUpload_FileUploaded"
DropZones
=
".uploading-section"
>
</
telerik:RadAsyncUpload
>
</
ContentTemplate
>
</
asp:UpdatePanel
>
Hristo Valyavicharski
Telerik
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to the blog feed now.
0

Dave
Top achievements
Rank 1
answered on 25 Sep 2013, 07:33 PM
Hi Hristo,
Unfortunately this does not fix the problem. The Browse button/textbox still do not work after the first upload.
Thanks,
Dave
Unfortunately this does not fix the problem. The Browse button/textbox still do not work after the first upload.
Thanks,
Dave
0
Hi Dave,
Unfortunately I couldn't manage to replicate the same behavior as you. The pasted code works at my side. Please review the following video.
I would suggest you to open new support ticket and attach sample project, so I can run and debug it. And I will be able to provide you more detailed information about this problem.
Regards,
Hristo Valyavicharski
Telerik
Unfortunately I couldn't manage to replicate the same behavior as you. The pasted code works at my side. Please review the following video.
I would suggest you to open new support ticket and attach sample project, so I can run and debug it. And I will be able to provide you more detailed information about this problem.
Regards,
Hristo Valyavicharski
Telerik
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to the blog feed now.