FileUpload1 在部分浏览器中实现多选

 <asp:FileUpload ID="FileUpload1" multiple runat="server" />

添加    multiple  这个就可以  

ie 不行   有些浏览器是可以支持的


        HttpFileCollection files = HttpContext.Current.Request.Files;
        for (int iFile = 0; iFile < files.Count; iFile++)
        {

            //检查文件扩展名字
            HttpPostedFile postedFile = files[iFile];
            string conentType = Path.GetExtension(postedFile.FileName).ToLower();
            if (conentType == ".jpg" || conentType == ".jpeg" || conentType == ".png" || conentType == ".bmp" || conentType == ".gif")
            {
             
            }
        }
      保存方法

原文地址:https://www.cnblogs.com/njccqx/p/7169415.html