Rank: Member Groups: Member
Joined: 8/9/2007 Posts: 18
|
Hi EO,
I'm having a little issue with the AJAXUploader, where the PostedFiles collection is empty if autopostback="false".
It seems to be the same on the Live Demo for "Delayed PostBack" (collection length is also returning zero).
Can you let me know if I'm going mad, or if there's a fix available please? As always I'll happily test a beta version if needed :)
Regards,
Richard.
|
Rank: Administration Groups: Administration
Joined: 5/27/2007 Posts: 24,193
|
Hi Richard, PostedFiles are automatically cleared after FileUploaded event (it should not have, we will need to fix this), so if you handle the uploader's FileUploaded event, you should have all the files. Another option is to use a separate AJAXPostedFileList control: http://www.essentialobjects.com/ViewDoc.aspx?t=EO.Web.AJAXPostedFileList.htmlThat control keeps the full file list all the time. We will let you know as soon as the first issue is fixed. Thanks!
|
Rank: Member Groups: Member
Joined: 8/9/2007 Posts: 18
|
Ok cool, I've worked around it for now as follows:
Code: Visual Basic.NET
Private attFile As EO.Web.AJAXPostedFile
Private Sub updDocument_FileUploaded(ByVal sender As Object, ByVal e As System.EventArgs) Handles updDocument.FileUploaded
If updDocument.PostedFiles.Length > 0 Then attFile = updDocument.PostedFiles(updDocument.PostedFiles.Length - 1)
End Sub
Private Sub cmdAddAttachment_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles cmdAddAttachment.Click
'Access attFile Here
End Sub
...so no hurry on the fix ;) Regards, Richard.
|