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

RadUpload Control not working as expected

1 Answer 55 Views
AsyncUpload
This is a migrated thread and some comments may be shown as answers.
Saravanan
Top achievements
Rank 1
Saravanan asked on 11 Dec 2012, 01:58 PM
Hi,

The RadUpload is not working as expected.

I have placed the RadUpload control inside Ajax:Updatepanel in Usercontrol(.ascx), I am calling the usercontrol in my .aspx page. 

Once the page get loaded, I have selected the files and tried to upload through button click event.  But "radFileUpload.UploadedFiles.Count" is coming as 0. It supposed to return selected files count.

It was working fine if I placed the RadUpload control directly in to .Aspx page.(Without UpdatePanel)

So Please provide me a valuable solution.

Regards,
Saravanan M

1 Answer, 1 is accepted

Sort by
0
Princy
Top achievements
Rank 2
answered on 12 Dec 2012, 04:44 AM
Hi Saravanan,

The problem happens, because RadUpload cannot upload files using AJAX calls. In order to upload a file your application must perform a full page postback. You can create a PostBackTrigger in the UpdatePanel for the button that initiates postback as follows.

ASPX:
<asp:UpdatePanel runat="server" ID="UpdatePanel1">
    <ContentTemplate>
        <telerik:radupload runat="server" id="RadUpload1" />
        <asp:Button runat="server" ID="ButtonSubmit" Text="Postback" />
    </ContentTemplate>
    <Triggers>
        <asp:PostBackTrigger ControlID="ButtonSubmit" />
    </Triggers>
</asp:UpdatePanel>

Hope this helps.

Regards,
Princy.
Tags
AsyncUpload
Asked by
Saravanan
Top achievements
Rank 1
Answers by
Princy
Top achievements
Rank 2
Share this question
or