Hi,
I tried to upload multiple files with async upload rad control.But it upload only the first file and the rest of the files are not uploaded.
Please give me the solution.
My Code:
In .Cs page:
protected void RadAsyncUpload1_FileUploaded(object sender, FileUploadedEventArgs e)
{
UploadedFile file = RadAsyncUpload1.UploadedFiles[0];
string s = file.FileName;
string path = Path.GetFileName(s);
string targetfolder = RadAsyncUpload1.TargetFolder;
e.File.SaveAs(Server.MapPath(targetfolder + e.File.FileName));
}
In .aspx page:
<telerik:RadAsyncUpload runat="server" ID="RadAsyncUpload1" overwriteexistingfiles="true" TargetFolder ="~/uploadattachment/" AllowedFileExtensions=".pdf,.doc,.docx,.txt"
MaxFileSize="524288"
Skin="Simple" MultipleFileSelection="Automatic"
UploadedFilesRendering="BelowFileInput" ChunkSize="0"
onfileuploaded="RadAsyncUpload1_FileUploaded">
</telerik:RadAsyncUpload>
I tried to upload multiple files with async upload rad control.But it upload only the first file and the rest of the files are not uploaded.
Please give me the solution.
My Code:
In .Cs page:
protected void RadAsyncUpload1_FileUploaded(object sender, FileUploadedEventArgs e)
{
UploadedFile file = RadAsyncUpload1.UploadedFiles[0];
string s = file.FileName;
string path = Path.GetFileName(s);
string targetfolder = RadAsyncUpload1.TargetFolder;
e.File.SaveAs(Server.MapPath(targetfolder + e.File.FileName));
}
In .aspx page:
<telerik:RadAsyncUpload runat="server" ID="RadAsyncUpload1" overwriteexistingfiles="true" TargetFolder ="~/uploadattachment/" AllowedFileExtensions=".pdf,.doc,.docx,.txt"
MaxFileSize="524288"
Skin="Simple" MultipleFileSelection="Automatic"
UploadedFilesRendering="BelowFileInput" ChunkSize="0"
onfileuploaded="RadAsyncUpload1_FileUploaded">
</telerik:RadAsyncUpload>