RadAjaxManagerProxy & FileUpload

2 posts, 0 answers
  1. Andrea D'Orio
    Andrea D'Orio avatar
    12 posts
    Member since:
    Mar 2007

    Posted 05 Feb 2009 Link to this post

    I have an issue when use RadAjaxManagerProxy to create loading effect and FileUpload control. Following my code:


        <telerik:RadAjaxManagerProxy ID="RadAjaxManagerProxy1" runat="server">
                <telerik:AjaxSetting AjaxControlID="btnImporta">
                        <telerik:AjaxUpdatedControl ControlID="lblStatus"/>

       <div style="padding-left:10px">
            <br />
            <asp:Label ID="lblCaption" runat="server"
                Text="Seleziona il file XML da importare: " ></asp:Label>
            <asp:FileUpload ID="fileUpload" runat="server" Width="300px"/>
            <br />        
            <br /><asp:Button ID="btnImporta" runat="server" onclick="Importa_Click" Text="Importa Dati" />
            <asp:Label ID="lblStatus" runat="server"


            protected void Importa_Click(object sender, EventArgs e)
                if (fileUpload.HasFile)
                        // Save file to tmp folder
                        // Import data
                    catch(Exception ex)

    I select my file, then click on "btnImporta" button: loading image appears and click event is fired but "fileUpload.HasFile" is false. Seems that after postback fileUpload control lost its reference. I try also setting EnableViewState=false but not work.
    Do you have any suggestion?

    Thanks a lot in advance
  2. Rosen
    Rosen avatar
    3214 posts

    Posted 09 Feb 2009 Link to this post

    Hi Andrea,

    I'm afraid that uploading files during ajax request is not possible due to the nature of xHTTPRequest object. Thus in order to upload file you should disable the ajax and use normal postbacks. For more information please refer to this help article.

    the Telerik team

    Check out Telerik Trainer, the state of the art learning tool for Telerik products.
  3. DevCraft R3 2016 release webinar banner
Back to Top