收集过来的:

       //获取上传文件的扩展名
        String fileExtension = System.IO.Path.GetExtension(FileUpload1.FileName).ToLower();
        //获取文件名
        String FileName = System.IO.Path.GetFileName(FileUpload1.FileName);
        //获取文件类型
        String FileKind = FileUpload1.PostedFile.ContentType 
        //获取文件大小
        String Size = FileUpload1.PostedFile.ContentLength.ToString();
        //保存文件
        FileUpload1.PostedFile.SaveAs(Server.MapPath("upload\\" +newname+ fileExtension));

相关文章:

  • 2022-12-23
  • 2021-11-25
  • 2021-12-11
  • 2022-12-23
  • 2021-11-29
  • 2021-05-20
  • 2022-03-05
猜你喜欢
  • 2022-12-23
  • 2021-10-01
  • 2021-08-01
  • 2021-05-30
  • 2021-06-17
  • 2022-12-23
相关资源
相似解决方案