Completed
Last Updated: 17 Jul 2020 15:07 by Diogo Mendonça
Diogo Mendonça
Created on: 15 Jul 2020 15:59
Category: AsyncUpload
Type: Bug Report
0
PostbackTriggers

Hello,

I have a problem with postback on RadAsyncUpload in my project.

So, I created a simple project, with your example (https://docs.telerik.com/devtools/aspnet-ajax/controls/asyncupload/how-to/how-to-persist-uploaded-files) and the problem remains.

if I define PostbackTriggers on the aspx page, after the post back, I can see the files uploaded on the page, but the UploadedFiles.Count in code behind returns zero.

<telerik:RadAsyncUpload runat="server" ID="RadAsyncUpload1" PostbackTriggers="Button3,Button4"></telerik:RadAsyncUpload>

if I define PostbackTriggers on the aspx.vb page, after the post back I can't see the files uploaded on the page, but the UploadedFiles.Count in code behind returns 1.

RadAsyncUpload1.PostbackTriggers = New String() {Button1.ClientID, Button2.ClientID}

 

So, there is no way to, after the postback, present the uploaded files in page and values in  RadAsyncUpload.UploadedFiles.

 

Please, check the attach files.

Best Regards,

Mauro Santos

Attached Files:
2 comments
Diogo Mendonça
Posted on: 17 Jul 2020 15:07

Hello Peter,

Thank you for your prompt reply.

I solved the problem with a asp:customvalidor and EnableCustomValidation=true in RadAsyncUpload control. In this way the uploaded file is never lost between postbacks. In your article, the file is lost after the first postback.

I will pay attention to the official Telerik assemblies in next tickets.

Best Regards,

Mauro Santos

ADMIN
Peter Milchev
Posted on: 17 Jul 2020 11:23

Hello Mauro,

The PostbackTriggers collection expects the normal ID of the Controls, not their ClientIDs. That is the reason you see a difference in the behavior between the markup and code-behind setting. 

Regarding the UploadedFiles count, when you define PostbackTriggers and the postback is not triggered by one of these controls, the UploadedFiles will always be 0.

An article that you might find useful is the one below:

Also, I have modified your archive and removed the official Telerik assemblies as this is a publicly available thread.

Regards,
Peter Milchev
Progress Telerik