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

Controlling postback within ascx control

6 Answers 314 Views
AsyncUpload
This is a migrated thread and some comments may be shown as answers.
Heath
Top achievements
Rank 1
Heath asked on 12 Feb 2015, 08:18 PM
I've searched various places but haven't found any answer so I'll throw it out here.

We have an ascx control with a RadAsyncUpload and RadComboBox. The ComboBox posts back which causes the Upload to lose the files. I've tried using PostbackTrigger property but my issue is the button that should cause the Postback and saving the file is on the parent aspx page. 

Any clues on how to get this to work properly?

6 Answers, 1 is accepted

Sort by
0
Nencho
Telerik team
answered on 17 Feb 2015, 09:07 AM
Hello,

I tried to replicate the described  issue at my end, but to no avail. This is why, I am sending you the sample project, I have tested with. Could you give it a try at your end and let us know how your implementation differs from the demonstrated one?

Regards,
Nencho
Telerik
 

Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

 
0
Heath
Top achievements
Rank 1
answered on 18 Feb 2015, 06:29 PM
Thanks Nencho. After looking at your sample project and then taking a look back at mine I found we had nearly identical pages and the button I was referencing in the PostBackTrigger was on the page not being used. Once I changed the button name it worked fine.
0
Heath
Top achievements
Rank 1
answered on 18 Feb 2015, 06:44 PM
Another question now that this issues has been resolved:

Using the onClientFileUploaded javascript method we are dynamically appending an input field beside each uploaded file to use to enter a description of the file. On postback this input field is lost. Any ideas on how to maintain that input field and the text entered?
0
Nencho
Telerik team
answered on 23 Feb 2015, 10:43 AM
Hello,

Could you please elaborate a bit more on your scenario? How do you append those fields? In addition, please provide us with a simplified example of the implementation that you use so we could inspect it locally.

Regards,
Nencho
Telerik
 

Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

 
0
Heath
Top achievements
Rank 1
answered on 23 Feb 2015, 09:04 PM
We are using the example under Application Scenarios: Adding Information to Uploaded Files. Everything works fine until there is a postback by a control that is not listed as a PostBackTrigger. The file is retained but the input and label that were added disappear from the page.

http://www.telerik.com/help/aspnet-ajax/asyncupload-adding-information.html
0
Nencho
Telerik team
answered on 26 Feb 2015, 01:51 PM
Hello,

In order to persist the dynamically added field at client-side, I would suggest you to omit triggering a full postback. In other words, you can ajaxify the RadComboBox. I have implemented this suggestion in the attached sample project.(refer to the UserControl)

Regards,
Nencho
Telerik
 

Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

 
Tags
AsyncUpload
Asked by
Heath
Top achievements
Rank 1
Answers by
Nencho
Telerik team
Heath
Top achievements
Rank 1
Share this question
or