当前位置:编程学习 > asp >>

.net后台删除文件时若URL为相对路径

file = "~/images/1.jpg"
path=Server.MapPath(file);   //转为绝对路径
System.IO.File.Delete(path);
补充:Web开发 , ASP.Net ,
CopyRight © 2012 站长网 编程知识问答 www.zzzyk.com All Rights Reserved
部份技术文章来自网络,