<asp:FileUpload runat="server" ID="imgUpload" AllowMultiple="true" />
后台:
HttpFileCollection files = Request.Files; if (files.Count > 0 && imgUpload.HasFile) { for (int i = 0; i < files.Count; i++) { HttpPostedFile file = files[i]; //处理... } }
<asp:FileUpload runat="server" ID="imgUpload" AllowMultiple="true" />
后台:
HttpFileCollection files = Request.Files; if (files.Count > 0 && imgUpload.HasFile) { for (int i = 0; i < files.Count; i++) { HttpPostedFile file = files[i]; //处理... } }