.NET 4.5 and higher中的FileUpload.AllowMultiple
属性允许控件 Select 多个文件.
<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