I have a file upload control.Now on clicking on that, I want to select multiple files.
How can I do so?
The FileUpload. AllowMultiple property in . NET 4.5 and higher will allow you the control to select multiple files.
Tip: For <input type="file"> : To select multiple files, hold down the CTRL or SHIFT key while selecting.
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
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With