Greetings,
I am working with your demo controls (EO.Web.dll v
4.0.20.2) and I am having an issue with the AJAXUploader. The control was added to the page using the following (filtered for simplicity's sake) markup:
Code: HTML/ASPX
<asp:Panel ID="pnlOveralPage" runat="server">
<table>
<tr>
<td><%--Other page content, etc...--%></td>
</tr>
<tr>
<td>
<asp:UpdatePanel ID="upFileUpload" runat="server" UpdateMode="Conditional">
<Triggers>
<%--Assorted triggers for switching the panels, etc...--%>
</Triggers>
<ContentTemplate>
<div class="FormPanelContainer">
<asp:LinkButton ID="lnkFile_Save" runat="server" Text="[Save]" />
<%--Additional panels for a current file list via GridView, and other
panel state changing buttons, like: Insert & Cancel, etc... --%>
<asp:Panel ID="pnlFileUpload" runat="server" Visible="True">
<eo:AJAXUploader ID="AJAXUploader1" runat="server" Width="250px"
TempFileLocation="~/fileuploads/temp" MaxDataSize="30000"
AutoPostBack="false" EnableViewState="true">
</eo:AJAXUploader>
</asp:Panel>
</div>
</ContentTemplate>
</asp:UpdatePanel>
</td>
</tr>
</table>
</asp:Panel>
By design, using the link button's ("lnkFile_Save") click event, on the server side the intention is to handle saving the file from the uploaded "
eouploader.{GUID}.data" file and transferring it to a usible directory on the server (one not managed for deletion by the control, i.e. somewhere other than the "temp" directory). Where the code-behind for this event handler looks similar to this:
Code: Visual Basic.NET
Protected Sub lnkFile_Save_Click(ByVal sender As Object, _
ByVal e As System.EventArgs) _
Handles lnkFile_Save.Click
Dim files As EO.Web.AJAXPostedFile() = Me.AJAXUploader1.PostedFiles
For Each file AS EO.Web.AJAXPostedFile In files
'Code to handle copying from the /temp directory to the
'appropriate "perminant" directory for use by the site.
Next
Me.AJAXUploader1.ClearPostedFiles()
Me.AJAXUploader1.Dispose()
'Sort the GridView showing the uploaded files
'and switch the panel to the proper view, etc...
End Sub 'lnkFile_Save_Click
And so, when I step through the code, I notice that the "files" object has a length of zero, eventhough the control properly uploads the files (I can see them in the /temp directory) and lists them in the delete list prior to clicking the "[Save]" button. I have made sure that the proper service account has write permissions to the temp directory as well as the other "appropriate" resulting directory(s). But, for some odd reason the Uploader control does not have any files in its
PostedFiles array when processing this click event. Any advice about solving this issue would be appreciated. It is completely possible that I am missing something basic about your control here...
Thanks in advance,
Padishar