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

Problem with AsyncUpload and User Control .ascx files

1 Answer 64 Views
AsyncUpload
This is a migrated thread and some comments may be shown as answers.
Brett
Top achievements
Rank 1
Brett asked on 22 Jun 2014, 07:07 AM
I am having issues using the AsynUpload control and .ascx files.  It's almost like it doesn't work with them at all.  I try to use the clientside development and the server side development and either I get errors or it just doesn't fire.  What can I do to alleviate this issue?

1 Answer, 1 is accepted

Sort by
0
Princy
Top achievements
Rank 2
answered on 23 Jun 2014, 06:09 AM
Hi Brett,

The provided information is not enough to replicate the issue. Please have a look into the sample code snippet which works fine at my end. 

ASPX:
<uc1:Asyncupload ID="Asyncupload1" runat="server" />

ASCX:
<telerik:RadAsyncUpload ID="rasyncuploadUserControl" runat="server" OnClientFileUploaded="getFileName">
</telerik:RadAsyncUpload>
<telerik:RadButton ID="rbtnUpload" runat="server" Text="Upload" OnClick="rbtnUpload_Click">
</telerik:RadButton>

JavaScript:
function getFileName(sender, args) {
    alert(args.get_fileName());
}

ASCX.CS:
protected void rbtnUpload_Click(object sender, EventArgs e)
{
    int uploadedFileCount = rasyncuploadUserControl.UploadedFiles.Count;
}

Thanks,
Princy.
Tags
AsyncUpload
Asked by
Brett
Top achievements
Rank 1
Answers by
Princy
Top achievements
Rank 2
Share this question
or