|
Rank: Newbie Groups: Member
Joined: 3/10/2008 Posts: 8
|
Hello, i have a problem with the AJAXUploader, im using it within a pageView and the AJAXUploader when the button upload is clicked it doesn´t fires the event OnFileUploaded, how I can get to fire that event?
I have the following code, thanks:
<eo:PageView ID="picturePageView" runat="server"> <asp:UpdatePanel ID="pictureUpdatePanel" runat="server" ChildrenAsTriggers="true"> <ContentTemplate> <table> <tr> <td> <asp:Image ID="profilePictureImage" runat="server" Height="300" Width="183px" ImageUrl="~/App_Themes/iBelong/Images/EmptyProfilePicture.png" /> </td> <td valign="top"> <eo:AJAXUploader ID="ajaxUploader" runat="server" AllowedExtension=".jpg|.png|.gif" MaxDataSize="4096" MaxFileCount="1" OnFileUploaded="ajaxUploader_FileUploaded" ProgressBarSkin="Windows_Vista" TempFileLocation="~/UploadTemp" Width="100%" AutoPostBack="True" PostedFileLabelFormat="{posted_file_name} - ({posted_file_size} bytes)"> <LayoutTemplate> <table border="0" cellpadding="2" cellspacing="0" width="250px"> <tr> <td> <asp:PlaceHolder ID="InputPlaceHolder" runat="server">Input Box Place Holder </asp:PlaceHolder> </td> </tr> <tr> <td align="right"> <asp:Button ID="UploadButton" runat="server" Text="Upload" /> </td> </tr> <tr> <td> <eo:ProgressBar ID="ProgressBar" runat="server" ControlSkinID="Windows_XP" /> </td> </tr> <tr> <td> <asp:PlaceHolder ID="ProgressTextPlaceHolder" runat="server">Progress Text Place Holder</asp:PlaceHolder> </td> </tr> <tr> <td align="right"> <asp:Button ID="CancelButton" runat="server" Text="Cancel" /> </td> <tr> <td> <asp:PlaceHolder ID="PostedFilesPlaceHolder" runat="server">Posted Files Place Holder</asp:PlaceHolder> </td> </tr> <tr> <td align="right"> <asp:Button ID="DeleteButton" runat="server" Text="Delete Selected Files" /> </td> </tr> </tr> </table> </LayoutTemplate> </eo:AJAXUploader> </td> </tr> </table> </ContentTemplate> </asp:UpdatePanel> </eo:PageView>
|
|
Rank: Administration Groups: Administration
Joined: 5/27/2007 Posts: 24,218
|
Hi, We tried your code with the latest version and it works fine. Try checking whether you have the latest version first, then following guidelines in this post: http://www.essentialobjects.com/Forum/Default.aspx?g=posts&t=1186Please let us know if you still have problems. Thanks
|
|
Rank: Newbie Groups: Member
Joined: 3/10/2008 Posts: 8
|
Hi,
I have installed Version=5.0.43.2 and I created a new blank page for test, and I still have problems to fire the OnFileUploaded event, maybe I missing something, can you helpme i have he following code in the test page.
Thanks,
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="testAjaxUploader.aspx.cs" Inherits="iBelong.ContentStore.UI.Web.Pages.testAjaxUploader" %>
<%@ Register assembly="EO.Web" namespace="EO.Web" tagprefix="eo" %>
<!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>Untitled Page</title> </head> <body> <form id="form1" runat="server"> <div> <asp:Button runat="server" ID="UploadButton2" Text="Upload" OnClick="ajaxUploaderForTest_FileUploaded" /> <eo:AJAXUploader ID="AJAXUploader1" runat="server" Width="250px" TempFileLocation="~/UploadTemp" OnFileUploaded="ajaxUploaderForTest_FileUploaded" AutoPostBack="true"> <LayoutTemplate> <table border="0" cellPadding="2" cellSpacing="0" width="250px"> <tr> <td> <asp:PlaceHolder runat="server" id="InputPlaceHolder">Input Box Place Holder </asp:PlaceHolder> </td> </tr> <tr> <td align="right"> <asp:Button runat="server" ID="UploadButton" Text="Upload" OnClick="ajaxUploaderForTest_FileUploaded" /> </td> </tr> <tr> <td> <eo:ProgressBar runat="server" id="ProgressBar" ControlSkinID="Windows_XP" /> </td> </tr> <tr> <td> <asp:PlaceHolder runat="server" id="ProgressTextPlaceHolder">Progress Text Place Holder </asp:PlaceHolder> </td> </tr> <tr> <td align="right"> <asp:Button runat="server" ID="CancelButton" Text="Cancel" /> </td> <tr> <td> <asp:PlaceHolder runat="server" id="PostedFilesPlaceHolder">Posted Files Place Holder </asp:PlaceHolder> </td> </tr> <tr> <td align="right"> <asp:Button runat="server" ID="DeleteButton" Text="Delete Selected Files" /> </td> </tr> </table> </LayoutTemplate> </eo:AJAXUploader> </div> </form> </body> </html>
|
|
Rank: Administration Groups: Administration
Joined: 5/27/2007 Posts: 24,218
|
Hi,
The latest is 5.0.51.2. Can you try that one first?
Thanks
|
|
Rank: Newbie Groups: Member
Joined: 3/10/2008 Posts: 8
|
I updated the .dll to the lastest version, but it doesn't work yet, the code of the test page is the following:
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="testAjaxUploader.aspx.cs" Inherits="iBelong.ContentStore.UI.Web.Pages.testAjaxUploader" %>
<%@ Register assembly="EO.Web" namespace="EO.Web" tagprefix="eo" %>
<!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>Untitled Page</title> </head> <body> <form id="form1" runat="server"> <div> <eo:AJAXUploader ID="AJAXUploader1" runat="server" Width="250px" TempFileLocation="~/UploadTemp" OnFileUploaded="ajaxUploaderForTest_FileUploaded" AutoPostBack="true"> <LayoutTemplate> <table border="0" cellPadding="2" cellSpacing="0" width="250px"> <tr> <td> <asp:PlaceHolder runat="server" id="InputPlaceHolder">Input Box Place Holder </asp:PlaceHolder> </td> </tr> <tr> <td align="right"> <asp:Button runat="server" ID="UploadButton" Text="Upload" OnClick="ajaxUploaderForTest_FileUploaded" /> </td> </tr> <tr> <td> <eo:ProgressBar runat="server" id="ProgressBar" ControlSkinID="Windows_XP" /> </td> </tr> <tr> <td> <asp:PlaceHolder runat="server" id="ProgressTextPlaceHolder">Progress Text Place Holder </asp:PlaceHolder> </td> </tr> <tr> <td align="right"> <asp:Button runat="server" ID="CancelButton" Text="Cancel" /> </td> <tr> <td> <asp:PlaceHolder runat="server" id="PostedFilesPlaceHolder">Posted Files Place Holder </asp:PlaceHolder> </td> </tr> <tr> <td align="right"> <asp:Button runat="server" ID="DeleteButton" Text="Delete Selected Files" /> </td> </tr> </table> </LayoutTemplate> </eo:AJAXUploader> </div> </form> </body> </html>
|
|
Rank: Administration Groups: Administration
Joined: 5/27/2007 Posts: 24,218
|
Hi,
We have tried your code multiple times and it worked fine here. The only differences between our code and your code are:
1. We have an empty code behind .cs file. The test page class inherits directly from System.Web.UI.Page. So check whether your code behind class iBelong.ContentStore.UI.Web.Pages.testAjaxUploader contains additional code; 2. We changed the uploader's TempFileLocation. Which should not cause any problem;
We then set a breakpoint in ajaxUploaderForTest_FileUploaded handler and it always get hit when the file finishes uploading.
So it appears the problem is related to your project (or at least some how triggered by elements in your project). I would recommend you load our sample project and verify if that works; If that doesn't work we can setup a web meeting to take a look on your machine to see what we can find.
Thanks
|
|
Rank: Member Groups: Member
Joined: 12/17/2007 Posts: 10
|
We solved this problem. AJAXUploader does not accept posting when trace is enabled. We disabled trace and it works now, it does not make sense that trace has to be disabled for it to work.
What's going on?
|
|
Rank: Administration Groups: Administration
Joined: 5/27/2007 Posts: 24,218
|
Juan Roman Escamilla wrote:We solved this problem. AJAXUploader does not accept posting when trace is enabled. We disabled trace and it works now, it does not make sense that trace has to be disabled for it to work.
What's going on? This is a known restriction. ASP.NET's trace module tries to fetch all the form data (which is the whole file) before it hands over the request to down stream, and it usually fails while fetching the data when it's too big. Our uploader never got a chance to handle the request in this case.
|
|
Rank: Member Groups: Member
Joined: 12/17/2007 Posts: 10
|
You should have answered that from the beginning. It would have saved us a lot of time! Or at the very least you should include that in your documentation.
|
|
Rank: Administration Groups: Administration
Joined: 5/27/2007 Posts: 24,218
|
Juan Roman Escamilla wrote:You should have answered that from the beginning. It would have saved us a lot of time! It would be pretty hard for us to make any connection to this when the question is titled as "AJAXUploader within a pageView of a Multipage". :) Juan Roman Escamilla wrote: Or at the very least you should include that in your documentation. Totally agree. We will try to put this into our documentation as soon as possible.
|
|