|
Rank: Newbie Groups: Member
Joined: 7/23/2008 Posts: 3
|
We are using the AjaxUploader from the 2008 EO.Web Controls in a multiview and would like to move the files to the final location using code after the submit button is clicked. The AjaxUploader in the first multiview and the submit button is in the 4th multiview. We had this working with the 2007.2 Web Controls but it no longer works. Any suggestions on what has changed. We can supply a small example if needed. Thank you.
|
|
Rank: Administration Groups: Administration
Joined: 5/27/2007 Posts: 24,193
|
A small example will surely help. So please provide one if you can. Thanks!
|
|
Rank: Newbie Groups: Member
Joined: 7/23/2008 Posts: 3
|
Here is a sample using a default.aspx page:
<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default.aspx.cs" Inherits="_Default" %>
<%@ Register Assembly="EO.Web" Namespace="EO.Web" TagPrefix="eo" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head runat="server"> <title>Untitled Page</title> </head> <body> <form id="form1" runat="server"> <asp:ScriptManager ID="ScriptManager1" runat="server" /> <div> <br /> <br /> <br /> <br /> <asp:MultiView runat="server" ActiveViewIndex="0" ID="Tabs"> <asp:View runat="server" ID="View1"> <eo:AJAXUploader ID="AJAXUploader1" runat="server" Width="250px" TempFileLocation="~/upload"> </eo:AJAXUploader> <br /> <asp:Button ID="Next1" runat="server" Text="Next" OnClick="NextClick" UseSubmitBehavior="false" /> </asp:View> <asp:View runat="server" ID="View2"> <b>Hello, please continue by clicking 'Next'</b> <br /> <asp:Button ID="Next2" runat="server" Text="Next" OnClick="NextClick" UseSubmitBehavior="false" /> </asp:View> <asp:View runat="server" ID="View3"> <b>Hello, please continue by clicking 'Next' again</b> <br /> <asp:Button ID="Next3" runat="server" Text="Submit" OnClick="MoveFile" UseSubmitBehavior="true" /> </asp:View> <asp:View runat="server" ID="View4"> <b>THANK YOU! HAVE A NICE DAY!</b> <br /> </asp:View> </asp:MultiView> <br /> </div> </form> </body> </html>
Here is the code from the code behind page:
using System; using System.Data; using System.Configuration; using System.Web; using System.Web.Security; using System.Web.UI; using System.Web.UI.WebControls; using System.Web.UI.WebControls.WebParts; using System.Web.UI.HtmlControls; using System.IO;
public partial class _Default : System.Web.UI.Page { protected void Page_Load(object sender, EventArgs e) {
}
protected void MoveFile(object sender, EventArgs e) { String path = @"C:\Inetpub\wwwroot\TestUploading\final\Folder4"; if (AJAXUploader1.PostedFiles.Length > 0) { Directory.CreateDirectory(path); } foreach (EO.Web.AJAXPostedFile file in AJAXUploader1.PostedFiles) { //Move the file first //File.Move(file.TempFileName, @"C:\Inetpub\wwwroot\datarequest\final\" + file.ClientFileName); File.Move(file.TempFileName, path + "\\" + file.ClientFileName); } Tabs.ActiveViewIndex = Tabs.ActiveViewIndex + 1; }
protected void NextClick(object sender, EventArgs e) { int index = Tabs.ActiveViewIndex; Tabs.ActiveViewIndex = index + 1;
} }
|
|
Rank: Administration Groups: Administration
Joined: 5/27/2007 Posts: 24,193
|
Hi,
We have posted a new build that fixed this issue. Please check your private message for download locations.
Thanks!
|
|
Rank: Newbie Groups: Member
Joined: 7/23/2008 Posts: 3
|
The new control works if you only add one file, but as soon as you try to add a second file, you receive an error message.
EO.Web Controls Client Side Debug Message:
AJAXUploader 'AJAXUploader1' has failed due to a server side exception. Click OK to see the exception message.
Once you click OK, you get the following error message:
System.FormatException: Guid should only contain 32 digits with 4 dashes
|
|
Rank: Administration Groups: Administration
Joined: 5/27/2007 Posts: 24,193
|
Thanks for letting us know. We will look into it and get back to you as soon as possible.
Thanks
|
|
Rank: Administration Groups: Administration
Joined: 5/27/2007 Posts: 24,193
|
Hi,
We have posted a new build that fixed this problem. Please see your private message for download location.
Thanks!
|
|
Rank: Newbie Groups: Member
Joined: 7/23/2008 Posts: 3
|
The new executable seems to be working. Thank you for your help with this issue.
|
|