解决方法
.NET 4.5及更高版本中的
FileUpload.AllowMultiple
属性将允许控件选择多个文件。
<asp:FileUpload ID="fileImages" AllowMultiple="true" runat="server" />
.NET 4及以下版本
<asp:FileUpload ID="fileImages" Multiple="Multiple" runat="server" />
在后退时,您可以:
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