ValidatingFile not firing under ajax control

Thread is closed for posting
4 posts, 0 answers
  1. Philip
    Philip avatar
    70 posts
    Member since:
    Apr 2008

    Posted 24 Aug 2010 Link to this post

    I have a asp.net page built using radtabstrips, radmultipage and pageviews. I use an RadAjaxManager for updating my controls. I would like to place a radupload control on one of my pages, but I can not get the control to fire the validatingfile event when I upload the file. I have tried going into the ajax manager and setting the upload control as both the initiatior and the handled control, but this does not work.

    If I move the control to the very bottom of the page where it is outside of all other controls, the event fires. It stops working anytime I place it inside of a multipage. Even if I wrap this in a panel and use the ajax manager to hide and show the panel, the upload quits working here also.

    Any ideas on how to get this control to work inside of the page?
  2. Cori
    Cori avatar
    562 posts
    Member since:
    Jul 2010

    Posted 24 Aug 2010 Link to this post

    Hello Philip,

    You have to turn off Ajax when uploading a file. Refer to this demo:

    http://demos.telerik.com/aspnet-ajax/ajax/examples/common/fileupload/defaultcs.aspx

    It shows how it should be handled.

    I hope that helps.
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Philip
    Philip avatar
    70 posts
    Member since:
    Apr 2008

    Posted 24 Aug 2010 Link to this post

    Thanks for the quick reply, but I need a little more help.

    I added the following to the head of my page:

    function

     

    OnRequestStart(target, arguments) {

     

         

    if (arguments.get_eventTarget() == "Button5") {

     

                arguments.set_enableAjax(

    false);  

     

        }

     

    }

     

     


    Where Button5 is the initiating button for the callback. But it still isnt working. What am I missing here.

    <

     

    asp:Panel ID="Panel2" runat="server" Visible="false">

     

    <div id="moduploadformat" style="width: 800px;">

     

    <telerik:RadUpload ID="Radtest" runat="server" TargetFolder="~/Uploads" >

     

    </telerik:RadUpload>

     

    <asp:Button ID="Button5" runat="server" Text="Button" />

     

    </div>

     

    </asp:Panel>

     

     

  5. Cori
    Cori avatar
    562 posts
    Member since:
    Jul 2010

    Posted 25 Aug 2010 Link to this post

    Hello Philip,

    You need to change the line

    arguments.get_eventTarget() == "Button5" 

    to this

    arguments.get_eventTarget().indexOf("Button5") != -1

    I hope that helps.
Back to Top