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

Persist uploaded files after button_click event

1 Answer 75 Views
AsyncUpload
This is a migrated thread and some comments may be shown as answers.
Ever
Top achievements
Rank 1
Ever asked on 10 Mar 2015, 09:22 PM
Hello, I using RadAsycUpload ASP.NET AJAX 2013.3.1324.40

I need that RadAsyncUpload persists the uploaded files after that button_Click event finishes. 

For example, the click action saves all uploaded files in the database, if occurs an error (during saving the files), it is necesary to show a message to user and persist the selected files previously. I tried to specify the property PostbackTriggers="button" in the RadAsyncUpload but when I press the button this control is empty after of the postback.

 <telerik:RadAsyncUpload ID="radUploadOne" runat="server"
                    OnFileUploaded="radUpload_FileUploaded" 
                    MaxFileInputsCount="1" 
                    InputSize="4" Width="90px" 
                    PostbackTriggers="button">

<telerik:RadButton ID="button" runat="server" Text="ok" ClientIDMode="Static"
         onclick="button_Click">







1 Answer, 1 is accepted

Sort by
0
Plamen
Telerik team
answered on 12 Mar 2015, 06:59 AM
Hello Ever,

PostbackTriggers property of RadAsyncUpload points to the button that will upload the files and the observed behavior is expected. If you want to have a button that will postback and preserve the files you will have to add another button with different id.

Hope this will help you solve the issue.

Regards,
Plamen
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
Ever
Top achievements
Rank 1
Answers by
Plamen
Telerik team
Share this question
or