My problem is, nothing happens, the code behind doesn't fire...Maybe someone could point me in the right direction. Is it possible to do something like this or am I totaly wrong here?
default.aspx:
<
telerik:RadAsyncUpload
ID
=
"RadAsyncUpload1"
runat
=
"server"
CssClass
=
"async-attachment"
MultipleFileSelection
=
"Automatic"
RenderMode
=
"Lightweight"
OnFileUploaded
=
"UploadFiles"
TargetFolder
=
"../App_Themes/media"
HideFileInput
=
"true"
Localization-Select
=
"اختر الملف"
AllowedFileExtensions
=
".mp4,.webm,.ogv"
>
Default.aspx.cs
public
void
UploadFiles(
object
sneder, FileUploadedEventArgs e)
{
const
string
relativePath =
"~/App_Themes/media"
;
var filename = e.File.FileName;
var parentID = Convert.ToInt32(GridView1.SelectedValue);
var filesize = Convert.ToInt32(e.File.ContentLength);
var physicalSavePath = MapPath(relativePath) + filename;
//Store file info in database
var app_FilesAdapter =
new
app_FilesTableAdapter();
app_FilesAdapter.Insert(filename, relativePath + filename, parentID, 1, DateTime.Now, filesize);
//Save physical file on disk
e.File.SaveAs(physicalSavePath,
true
);
}