design time error for multifile upload control

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

design time error for multifile upload control

Guest-1137

hi I'm trying to move the files uploaded from the App_Data/NeatUpload_Temp folder to my "UploadedPhotos" folder in the root of my project

hi here is my .aspx page

 <Upload:MultiFile id="multiFileId" runat="server" UseFlashIfAvailable="true"  /><br />
            <Upload:ProgressBar id="progressBarId" runat="server" inline="true" /><br />
            <asp:Button id="submitButtonId" runat="server" Text="Submit" onclick="submitButtonId_Click" /><br />

and here is .aspc.cs page coad:

using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using Brettle.Web.NeatUpload;
using System.IO;

public partial class _Default : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {
        submitButtonId.Click += new System.EventHandler(this.submitButtonId_Click);
    }

   
    protected void submitButtonId_Click(object sender, EventArgs e)
    {
        if (IsValid && multiFileId.HasFile)
        {
            multiFileId.MoveTo(System.IO.Path.Combine(System.IO.Path.Combine(Request.PhysicalApplicationPath, "UploadedPhotos"), multiFileId.FileName), MoveToOptions.Overwrite);

           



        }
    }
}


i am getting design time error saying "Brettle.Web.NeatUpload.MultiFile' does not contain a definition for 'HasFile' and no extension method 'HasFile' accepting a first argument of type 'Brettle.Web.NeatUpload.MultiFile' could be found (are you missing a using directive or an assembly reference?)"
and "Error    3    'Brettle.Web.NeatUpload.MultiFile' does not contain a definition for 'MoveTo' and no extension method 'MoveTo' accepting a first argument of type 'Brettle.Web.NeatUpload.MultiFile' could be found (are you missing a using directive or an assembly reference?)"

am i doing something wrong or i am missing some library or reference to include????
pls help..............
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: design time error for multifile upload control

Dean Brettle
Administrator
Per the manual, "If you are using the MultiFile control, the multiFileId.Files property returns an array of UploadedFile objects. Those objects have members similar to the above InputFile members, that you can use to save and access the uploaded files".  For an example of using  MultiFile, see NeatUpload-version/dotnet/app/Brettle.Web.NeatUpload/Demo.aspx.cs.
Loading...