Web Forms upload guides
Multiple File Upload with AJAX in ASP.NET Web Forms
A claims form that needs five photos, or a support ticket with several logs, should not force the user to pick one file at a time. A standard asp:FileUpload control takes a single file per postback. AjaxUploader lets the user select a batch in one dialog and sends each file over AJAX, so the page does not reload between files.
Allow several files in one selection
Set AllowMultiple="true". The file dialog then accepts more than one selection, and each file gets its own row with its own progress bar:
<au:AjaxFileUpload ID="Photos" runat="server"
AllowMultiple="true"
ButtonText="Select Multiple Files"
AutoUpload="true"
ShowProgress="true" />
With AutoUpload="true", the upload starts as soon as the selection is made. Without it, the user clicks an upload button after choosing files.
Limit the batch size
Multi-select does not limit how many files a user may choose. Put that limit in the uploader. The max file count demo shows a cap on the number of files in one batch, and the max file size demo rejects oversized files before they are sent.
Control how many files transfer at once
Sending a batch in parallel is faster on a fast connection and heavier on the server. The concurrent file uploads guide explains how to choose the number of files that transfer at the same time, and how that differs from the chunk count within one large file.
Try it
The multiple file upload demo runs the markup above. Select several files at once and watch one row per file.
Related