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();
        }


 

相关文章:

  • 2021-10-06
  • 2021-06-01
  • 2021-10-05
  • 2022-12-23
  • 2022-12-23
  • 2021-12-16
  • 2021-04-22
  • 2021-10-07
猜你喜欢
  • 2022-01-04
  • 2022-12-23
  • 2021-08-22
  • 2022-12-23
  • 2021-10-02
  • 2021-07-24
  • 2021-07-01
相关资源
相似解决方案