在页面后面的代码容易实现
System.IO.File.Delete(Server.MapPath(path));
直接这样就可以了,但是如果我是写在一个类库里面比如有个方法在类库里面,并添加System.Web的引用
publice bool DelImage(string path)
{
   System.IO.File.Delete(Server.MapPath(path));}
但是不行的,我究竟应该怎么写的?