Rad upload does not work in User Control

Thread is closed for posting
3 posts, 0 answers
  1. Tarang
    Tarang avatar
    5 posts
    Member since:
    Sep 2012

    Posted 29 Oct 2010 Link to this post

    Hi,

    I have Radupload control in .ascx file some thing like this.

    <tel:RadUpload ID="ruConsent" runat="server" AllowedFileExtensions="jpg,jpeg,png,gif,pdf,doc,docx,xls,xlsx"
                               ControlObjectsVisibility="None" Height="24px" MaxFileSize="10485760">
                           </tel:RadUpload>

    On Submit button's Click event on code behind

    i have written liek this:
    if (ruConsent.UploadedFiles.Count > 0 && ruConsent.InvalidFiles.Count == 0)
    {
    // upload file
    }
    else
    {
    //Show error message that files are not valid
    }

    but i always ruConsent.UploadedFiles.Count remains 0. If i put it out side of RadAjaxPanel then it is working fine. But when kept inside it is not working. Any idea why ?
  2. Tarang
    Tarang avatar
    5 posts
    Member since:
    Sep 2012

    Posted 29 Oct 2010 Link to this post

    oh i just figured it out. When using RadAjaxpanel you have to disable Ajax support in case of RadUpload.  which you can do something like this:

    function OnRequestStart(target, arguments) 
      if (arguments.get_eventTarget().indexOf("ButtonSend") > -1) 
      
        arguments.set_enableAjax(false); 
      
    }
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Med
    Med avatar
    11 posts
    Member since:
    Apr 2012

    Posted 04 May 2012 Link to this post

    Hi Tarang,
    Excuse me but I have the same probleme us you but I can't understand the solution, ca you explain it more easely please,
    Thank you
Back to Top