|
Rank: Member Groups: Member
Joined: 12/26/2007 Posts: 13
|
I have a situation where the AJAXUploader.PostedFiles collection isn't recognizing any files in the collection when using AJAX, Panels and UpdatePanels. For example, I have the following AJAXUploader within a hidden asp:Panel.
Code: HTML/ASPX
<asp:Panel ID="pnlTest" Visible="False" DefaultButton="btnContinue" runat="server">
<eo:AJAXUploader ID="AJAXUploader" Width="600px" TempFileLocation="~/Temp" MaxDataSize="20000" Rows="1" AllowedExtension=".pdf" ClientSideOnError="AJAXUploaderErrorHandler" ProgressDialogID="AJAXUploaderProgressDialog1" ProgressTextFormat="Files: {transferred_file_count} of {total_file_count} files.
<LayoutTemplate>
...
</LayoutTemplate>
</eo:AJAXUploader>
</asp:Panel>
Based on some answers to other questions I set pnlTest.Visible to TRUE which allows the user to see the uploader, select their files, and upload them. All appears to work; however, the collection of PostedFiles is EMPTY:
Code: Visual Basic.NET
For Each MyFile As EO.Web.AJAXPostedFile In AJAXUploader.PostedFiles
Response.Write(MyFile.ClientFileName & "<br>")
Next
In doing much testing I have found that when you first get to the page if pnlTest is already visible (pnlTest.Visble = True) everything works and the PostedFiles collection contains the uploaded files; however, it's when you get to the page and pnlTest.Visible=False, and we later (via an AutoPostBack with an UpdatePanel) set pnlTest.Visible=True that the collection is empty. Everything appears to upload correctly - but when you try processing the files there are none there. It probably is worth mentioning that the files DO make it to the /Temp folder all of the time. It's just the PostedFiles collection is empty if the AJAXUploader control wasn't visible from the very beginning of the page being loaded.... Any ideas on how to work around this? I'm using EO.Web for ASP.NET 2.0 version 5.0.16.2 Thanks!
|
|
Rank: Administration Groups: Administration
Joined: 5/27/2007 Posts: 24,194
|
Hi,
Would you be able to create a full test page that demonstrates this problem?
Thanks!
|
|
Rank: Member Groups: Member
Joined: 12/26/2007 Posts: 13
|
I just worked up an example that demonstrates my issue. Here's the ASPX page:
Code: HTML/ASPX
<%@ Page Language="vb" AutoEventWireup="false" CodeBehind="Default.aspx.vb" Inherits="EoTest._Default" %>
<%@ Register TagPrefix="eo" NameSpace="EO.Web" Assembly="EO.Web" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
<title>EO AJAXUploader Test</title>
</head>
<body>
<form id="form1" runat="server">
<asp:ScriptManager ID="ScriptManager1" EnablePartialRendering="true" runat="server" />
<eo:CallbackPanel ID="EmptyCallback" runat="server" />
<asp:UpdatePanel ID="UpdatePanelTest" UpdateMode="Conditional" runat="server">
<ContentTemplate>
Show panel:
<asp:RadioButtonList ID="rdoShow" AutoPostBack="true" runat="server">
<asp:ListItem Value="False" Selected="True">No</asp:ListItem>
<asp:ListItem Value="True">Yes</asp:ListItem>
</asp:RadioButtonList>
<asp:Panel ID="pnlTest" Visible="False" runat="server">
<eo:AJAXUploader ID="MyAJAXUploader" Width="600px" TempFileLocation="~/Temp" MaxDataSize="20000" Rows="1" AllowedExtension=".pdf" ClientSideOnError="AJAXUploaderErrorHandler" ProgressDialogID="AJAXUploaderProgressDialog1" ProgressTextFormat="Files: {transferred_file_count} of {total_file_count} files.
<LayoutTemplate>
<TABLE cellSpacing="0" cellPadding="2" border="0" width="100%">
<TR>
<TD>
<asp:PlaceHolder id="InputPlaceHolder" runat="server">Input Box Place Holder</asp:PlaceHolder>
</TD>
</TR>
<TR>
<TD align="left">
<asp:Button id="UploadButton" runat="server" Text="Upload"></asp:Button>
</TD>
</TR>
<TR>
<TD>
<asp:PlaceHolder id="PostedFilesPlaceHolder" runat="server">Posted Files Place Holder</asp:PlaceHolder>
</TD>
</TR>
<TR>
<TD align="left">
<asp:Button id="DeleteButton" runat="server" Text="Delete Selected Files"></asp:Button>
</TD>
</TR>
</TABLE>
</LayoutTemplate>
</eo:AJAXUploader>
</asp:Panel>
</ContentTemplate>
</asp:UpdatePanel>
<asp:Button ID="btnSubmit" Text="Submit" runat="server" />
</form>
</body>
</html>
And code-behind:
Code: Visual Basic.NET
Partial Public Class _Default
Inherits System.Web.UI.Page
Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
End Sub
Private Sub UploadFiles(ByVal AJAXUploader As EO.Web.AJAXUploader)
'loop through the documents
For Each MyFile As EO.Web.AJAXPostedFile In AJAXUploader.PostedFiles
Response.Write(MyFile.ClientFileName & "<br>")
Next
'clear the posted files so we do not upload multiple copies accidentally
AJAXUploader.ClearPostedFiles()
End Sub
Private Sub btnSubmit_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles btnSubmit.Click
UploadFiles(MyAJAXUploader)
Response.Write("Done")
End Sub
Private Sub rdoShow_SelectedIndexChanged(ByVal sender As Object, ByVal e As System.EventArgs) Handles rdoShow.SelectedIndexChanged
pnlTest.Visible = rdoShow.SelectedValue
End Sub
End Class
The real culprit here I've found out is the UpdatePanel. If I don't use the UpdatePanel and let it do a normal postback everything works as expected, which you can see if you simply move this code OUT of the UpdatePanel:
Code: HTML/ASPX
Show panel:
<asp:RadioButtonList ID="rdoShow" AutoPostBack="true" runat="server">
<asp:ListItem Value="False" Selected="True">No</asp:ListItem>
<asp:ListItem Value="True">Yes</asp:ListItem>
</asp:RadioButtonList>
Can you duplicate with this example and provide any ideas or feedback, short of not using UpdatePanel's Thanks!
|
|
Rank: Administration Groups: Administration
Joined: 5/27/2007 Posts: 24,194
|
Hi,
Can you check which version you are running? We tested this with the latest version and it seems to be working fine.
Thanks!
|
|
Rank: Member Groups: Member
Joined: 12/26/2007 Posts: 13
|
From my original post: Quote:I'm using EO.Web for ASP.NET 2.0 version 5.0.16.2 If it's simply a matter of upgrading to a new version I'd be happy to consider that. Just let me know how to go about that and if there are costs associated with it based on our current version and license. Thanks!
|
|
Rank: Member Groups: Member
Joined: 12/26/2007 Posts: 13
|
FYI, upgrading to version 7.0.20.2 seems to solve the issue but now I need to deal with the licensing issue I guess since I receive this now: Quote:CallbackPanel EmptyCallback requires a license. You can purchase a license from http://www.essentialobjects.com/Order.aspx. Please refresh the page to continue. More on license. Already have a license? See troubleshooting License problems. Is there an specific upgrade license I should be looking at or do we need to purchase an entirely new license? Thanks.
|
|
Rank: Administration Groups: Administration
Joined: 5/27/2007 Posts: 24,194
|
Hi,
Sorry that we have missed the version info in the original post. At this moment, we are not exactly sure whether it is simple version issue or not without you confirming it. If you try the latest and it works for you, then we can conclude it's a simple version issue; Otherwise I guess it is not. :)
Your version (2007.2) is almost 2 years old, so there will be a cost involved if you update to the current version (2009). We did verify the latest 2008 build also work fine though. So you can update to the latest 2008 build and see if it works for you. There is no cost for you to update to 2008 because it is released within 1 year of your order. We will PM you as to where to download 2008.
Note the free update would not cover new controls, neither would it extend your tech support period (your tech support period actually have expired). If you are interested in the new controls, you can place an upgrade order to upgrade to 2009. This will be a full brand new order with another year of free upgrade and tech support except that you won't pay the full price. The current upgrade price for your version is $125. Please let us know if you are interested in that.
Thanks!
|
|
Rank: Member Groups: Member
Joined: 12/26/2007 Posts: 13
|
I'm ready to upgrade to 2009 (7.0.20.2)
I tried using the online order page but couldn't figure out how to get the upgrade price to apply.
Just let me know where to go and how to pay.
Thanks!!!
|
|
Rank: Administration Groups: Administration
Joined: 5/27/2007 Posts: 24,194
|
Hi,
We have sent a discount code to you via private message. You can click "inbox" on the top of the forum to view the message. You can then use the discount code to place a new order.
Thanks!
|
|
Rank: Member Groups: Member
Joined: 12/26/2007 Posts: 13
|
You guys are awesome! Thanks for the prompt replies and quick testing.
I just placed the order.
Thanks so much!!!!
|
|
Rank: Administration Groups: Administration
Joined: 5/27/2007 Posts: 24,194
|
You are very welcome. Glad that you like our product and service. Please do not forget to recommend us to others when you have a chance. :)
|
|