string savePath = @"images/1.gif";//这里是你的相对路径
savePath = Server.MapPath(savePath);//必须经过这一步操作才能变成有效路径
if (System.IO.File.Exists(savePath))//先判断文件是否存在,再执行操作
    System.IO.File.Delete(savePath);

相关文章:

  • 2021-04-26
  • 2022-12-23
  • 2022-02-27
  • 2021-11-20
  • 2021-12-08
  • 2022-12-23
  • 2021-12-21
  • 2022-12-23
猜你喜欢
  • 2022-02-21
  • 2021-09-21
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案