I am in the process of updating one of our web applications and replacing the RadUpload with the RadAsyncUpload control (along with updating all the other controls on the page).
The definition from the .aspx page and the the code behind is below...the trouble is that the when I click the Import button, it fires the Page_Load event, telling me it is doing the post back, but the FileUploaded event does not fire, which means that the For Each loop I have in the Button_Click event doesn't see any Uploaded files, and nothing happens.
UPDATE:
I've since tried setting the PostbackTriggers attribute...still nothing. Getting to the desperate stage here as we need to move this to production next week. ANY ideas will be greatly appreciated. Thx.
Sorry if I'm missing something simple, this is my first crack at the Upload/AsyncUpload control, and I didn't see anything in the other threads that got me there.
Thanks all!
The definition from the .aspx page and the the code behind is below...the trouble is that the when I click the Import button, it fires the Page_Load event, telling me it is doing the post back, but the FileUploaded event does not fire, which means that the For Each loop I have in the Button_Click event doesn't see any Uploaded files, and nothing happens.
UPDATE:
I've since tried setting the PostbackTriggers attribute...still nothing. Getting to the desperate stage here as we need to move this to production next week. ANY ideas will be greatly appreciated. Thx.
Sorry if I'm missing something simple, this is my first crack at the Upload/AsyncUpload control, and I didn't see anything in the other threads that got me there.
Thanks all!
<
telerik:RadAsyncUpload
ID
=
"RadAsyncUpload1"
runat
=
"server"
AllowedFileExtensions
=
".pdf"
OnFileUploaded
=
"RadAsyncUpload1_FileUploaded"
MaxFileInputsCount
=
"1"
AllowedMimeTypes
=
"application/pdf"
Width
=
"300px"
InputSize
=
"48"
MaxFileSize
=
"20600"
EnableFileInputSkinning
=
"False"
Skin
=
"Vista"
ChunkSize
=
"0"
TargetFolder
=
"c:/TESTUPLOADS"
>
</
telerik:RadAsyncUpload
>
</
td
>
</
tr
>
<
tr
>
<
td
><
asp:CheckBox
ID
=
"chkLibrary"
runat
=
"server"
Text
=
"Add To Library"
/>
</
td
>
</
tr
>
<
tr
>
<
td
>
<
table
cellpadding
=
"2"
cellspacing
=
"2"
width
=
"100%"
border
=
"0"
>
<
tr
>
<
td
style
=
"width:100%;"
>
<
asp:CustomValidator
ID
=
"Customvalidator1"
runat
=
"server"
Display
=
"Dynamic"
ClientValidationFunction
=
"validateRadAsyncUpload1"
>
<
span
style
=
"FONT-SIZE: 11px;"
>Invalid file type.</
span
>
</
asp:CustomValidator
>
</
td
>
<
td
>
<
asp:Button
ID
=
"buttonSubmit"
runat
=
"server"
CssClass
=
"RadUploadButton"
Text
=
"Import"
style
=
"width:95px"
/>
</
td
>
<
td
>
<
asp:Button
ID
=
"ctlCancelButton"
runat
=
"server"
OnClientClick
=
"Cancel_Clicked();return false;"
Text
=
"Cancel"
style
=
"width:95px"
/>
</
td
>
</
tr
>
Protected
Sub
RadAsyncUpload1_FileUploaded(sender
As
Object
, e
As
Telerik.Web.UI.FileUploadedEventArgs)
Handles
RadAsyncUpload1.FileUploaded
Dim
targetFolder
As
String
= RadAsyncUpload1.TargetFolder
Response.Write(Server.MapPath(targetFolder &
"/"
& e.File.FileName))
End
Sub