Click here to Skip to main content
15,922,007 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
I want to upload multiple image file just like 10,100,200 or 400 image file upload one time in project folder(folder name "Images").
Afzaal Ahmad Zeeshan 8-Nov-15 7:07am    

If you upload an image, like of 1MB size, then even just 10 images would cause the request to have 10MB of data. Users with slow internet connection would lose the process and upload would be cancelled.

Now, the answer is, you can upload as many images as you want. Just increase the maximum HTTP request size and upload the images you want.

use uploadify

use jquery.uploadify.js, jquery-1.3.2.min.js,uploadify.css

<asp:FileUpload ID="file_upload" runat="server" />
                         (Upload Multiple File Required Flash Player)

<a href="javascript:$('#<%=file_upload.ClientID%>').fileUploadStart()" class="bttnPage">Start Upload</a>
use this in below of your code
<script type = "text/javascript">
    function () {
        $("#<%=file_upload.ClientID %>").fileUpload({
            'uploader': 'scripts/uploader.swf',
            'cancelImg': 'images/cancel.png',
            'buttonText': 'Browse Files',
            'script': 'upload_demo.ashx',
            'folder': '~/demo_pdf/',
            'fileDesc': 'Pdf Files',
            'fileExt': '*.pdf',
            'multi': true,
            'auto': false

Create Handler upload_demo.ashx

public void ProcessRequest(HttpContext context)
        context.Response.ContentType = "text/plain";
        context.Response.Expires = -1;
            HttpPostedFile postedFile = context.Request.Files["Filedata"];

            string savepath = "";
            string tempPath = "";
            tempPath = "~/demo_pdf/";
            savepath = context.Server.MapPath(tempPath);
            string filename = postedFile.FileName;
            if (!Directory.Exists(savepath))

            postedFile.SaveAs(savepath + @"\" + filename);
            context.Response.Write(tempPath + "/" + filename);
            context.Response.StatusCode = 200;
        catch (Exception ex)
            context.Response.Write("Error: " + ex.Message);
Share this answer
Google is your friend: Be nice and visit him often. He can answer questions a lot more quickly than posting them here...

A very quick search gave over half a million hits: Google "multiple image file upload in c#"[^]
On teh first page was an article from this very site: Upload multiple files in[^]

In future, please try to do at least basic research yourself, and not waste your time or ours.
Share this answer
Agreed with the comment.

You need to create the chunks of these files and upload it using Worker (JavaScript solution).
Search for for the concepts.

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