zoukankan      html  css  js  c++  java
  • upload file to server

    Way 1:
          UpLoadFile webcontrol can finish it easy
    FileUpLoad ful_load =new FileUpLoad(); //FileUpLoad is a kind of control
    …..
    Set the upload file name;
    ful_load.SaveAs(Server.MapPath(ful_load.FileName));
    that’s ok!

    Way 2:   can upload many files in one time

            if (Request.Files.Count < 1)
                return;
            HttpPostedFile file = Request.Files[0];
            if (file != null && file.FileName.Length > 0)
            {
                file.SaveAs(Path.Combine(GetCurDir(), Path.GetFileName(file.FileName)));
                file.InputStream.Close();
            }


     

  • 相关阅读:
    学姐学长们的测试
    loli的测试——搜索
    搜索-2
    单调队列
    乱搞题 (不知道怎么分类)
    对拍及数据生成
    搜索-1
    矩形重叠
    拼写单词
    java笔记
  • 原文地址:https://www.cnblogs.com/Winston/p/1026471.html
Copyright © 2011-2022 走看看