I am trying to use the RadAsyncUpload to upload a file, the file does get uploaded but it is uploaded as soon as it is selected and the OnFileUploaded event is never fired. I have tried everything in the following links and none have worked: link1, link2, link3, link4. The .aspx file is quite large and so I will try to give all the important information without showing all lines of html. The uploader is in a radpane whose visibility is set to false until the user makes a selection, that radpane is nested within mutiple radpanes and splitters, all of which are inside an asp Panel. I am using the RadAjaxManager as well and I have added the uploader, panel and the postback trigger button to in an attempt to make it work. Not sure if this will make a difference but the uploader is also not uploading to the TargetFolder.
Here is the requestStart function to cause the postback (I do have the ClientEvents OnRequestStart in the ajaxManager):
<
telerik:RadCodeBlock
ID
=
"rcb1"
runat
=
"server"
>
<
script
type
=
"text/javascript"
>
function requestStart(target, arguments) {
if (arguments.get_eventTarget().indexOf("btnUpload") > -1) {
arguments.set_enableAjax(false);
}
if (arguments.get_eventTarget().indexOf("rauFile") > -1) {
arguments.set_enableAjax(false);
arguments.set_cancel(true);
}
}
</
script
>
</
telerik:RadCodeBlock
>
Here is the html for the radasyncupload and the postbacktrigger button:
<
telerik:RadAsyncUpload
ID
=
"rauFile"
runat
=
"server"
AllowedFileExtensions
=
".xls, .xlsx"
HideFileInput
=
"true"
PostbackTriggers
=
"btnUpload"
MaxFileInputsCount
=
"1"
OnFileUploaded
=
"rauFile_FileUploaded"
TargetFolder
=
"~/Uploads/Run Matrix/"
/>
<
telerik:RadButton
ID
=
"btnUpload"
runat
=
"server"
Text
=
"Upload"
OnClick
=
"btnUpload_Click"
/>