Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to choose multiple files using File Upload Control?

I have a file upload control.Now on clicking on that, I want to select multiple files.

How can I do so?

like image 605
priyanka.sarkar Avatar asked Jul 03 '13 07:07

priyanka.sarkar


People also ask

How do I select multiple files in ASP NET FileUpload?

The FileUpload. AllowMultiple property in . NET 4.5 and higher will allow you the control to select multiple files.

How do I select multiple files in browser upload file dialog?

Tip: For <input type="file"> : To select multiple files, hold down the CTRL or SHIFT key while selecting.


1 Answers

The FileUpload.AllowMultiple property in .NET 4.5 and higher will allow you the control to select multiple files.

<asp:FileUpload ID="fileImages" AllowMultiple="true" runat="server" /> 

.NET 4 and below

 <asp:FileUpload ID="fileImages" Multiple="Multiple" runat="server" /> 

On the post-back, you can then:

 Dim flImages As HttpFileCollection = Request.Files                     For Each key As String In flImages.Keys     Dim flfile As HttpPostedFile = flImages(key)     flfile.SaveAs(yourpath & flfile.FileName)  Next 
like image 130
Anand Thangappan Avatar answered Sep 23 '22 12:09

Anand Thangappan