• 多文档上传文件


     
                HttpFileCollection Files = HttpContext.Current.Request.Files;
                for (int i = 0; i < Files.Count; i++)
                {
                    HttpPostedFile PostedFile = Files[i];
                    if (PostedFile.ContentLength > 0)
                    {
                        string FileName = PostedFile.FileName;
                        string strExPrentFile = FileName.Substring(FileName.LastIndexOf(".") + 1);

                        string sFilePath = "/uploadfile/hotel/" + StringClass.makeFileName24() + i + strExPrentFile;
                        PostedFile.SaveAs(Server.MapPath(sFilePath));
                    }
                    else
                    {
                        //this.LabMessage.Text = "不能上传空文件";
                    }
                }
     

  • 相关阅读:
    UML类图
    SCIM 输入法
    linux shell 快捷键
    linux find
    Extern "C"
    C++4个基本函数
    运算符号重载:前置与后置单目运算++
    Oracle数据库的安全策略
    help on IlegalStateException 关于 HttpServletRequest.getParameterMap()
    再谈时间函数
  • 原文地址:https://www.cnblogs.com/siyechenmu/p/4484774.html
Copyright © 2020-2023  润新知