Click here to Skip to main content
15,881,139 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I have been using this:

VB
<ajaxToolkit:AsyncFileUpload OnClientUploadError="uploadError" OnClientUploadComplete="uploadComplete" runat="server"
                ID="AsyncFileUpload1" UploaderStyle="Traditional" CompleteBackColor="White" UploadingBackColor="#CCFFFF"
                ThrobberID="imgLoader" OnUploadedComplete="FileUploadComplete" />


with the background code:

protected void FileUploadComplete(object sender, EventArgs e)
        {
            
            string filename = System.IO.Path.GetFileName(AsyncFileUpload1.FileName);
            AsyncFileUpload1.SaveAs(Server.MapPath("Uploads/") + filename);
            byte[] file = new byte[AsyncFileUpload1.PostedFile.InputStream.Length];
            file = ReadFile(AsyncFileUpload1.PostedFile.InputStream);
            Session["File"] = file;

        }


to get a single file and then put it to a DB and it's working but how do I change this to a multiple file upload?
Posted

1 solution

Unless something changed, you cannot use it to upload multiple files. You either need to add several to a page, keep reusing the one, or get a 3rd party control that supports multiple file uploads.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900