string fileNameNo = Path.GetFileName(FileUploadImg.PostedFile.FileName);                 //获取文件名和扩展名
string DirectoryName = Path.GetDirectoryName(FileUploadImg.PostedFile.FileName);         //获取文件所在目录
string Extension = Path.GetExtension(FileUploadImg.PostedFile.FileName);                 //获取扩展名
string fileName = Path.GetFileNameWithoutExtension(FileUploadImg.PostedFile.FileName);   //获取文件名(不包括扩展名)
string fullPath = Path.GetFullPath(FileUploadImg.PostedFile.FileName);                   //获取文件的绝对路径
string PathRoot = Path.GetPathRoot(FileUploadImg.PostedFile.FileName);                 
 //获取文件所在地分区

相关文章:

  • 2022-12-23
  • 2022-02-07
  • 2022-02-07
  • 2022-12-23
  • 2022-12-23
  • 2022-01-10
  • 2022-12-23
  • 2021-12-31
猜你喜欢
  • 2021-06-09
  • 2022-12-23
  • 2022-02-07
  • 2022-12-23
相关资源
相似解决方案