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

Rad upload does not work in User Control

2 Answers 105 Views
Upload (Obsolete)
This is a migrated thread and some comments may be shown as answers.
Tarang
Top achievements
Rank 1
Tarang asked on 29 Oct 2010, 08:57 PM
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 Answers, 1 is accepted

Sort by
0
Tarang
Top achievements
Rank 1
answered on 29 Oct 2010, 09:34 PM
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); 
  
}
0
Med
Top achievements
Rank 1
answered on 04 May 2012, 02:02 PM
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
Tags
Upload (Obsolete)
Asked by
Tarang
Top achievements
Rank 1
Answers by
Tarang
Top achievements
Rank 1
Med
Top achievements
Rank 1
Share this question
or