//删除原有图片 public void DeletePhoto(string ID) { string str = newshelper.NewsDelPhoto(ID); if (str != "") { string strPath = HttpContext.Current.Request.FilePath + "/../../upload_Img/News"; //项目根路径 string fullname = Server.MapPath(strPath + "/" + str);//保存文件的路径 DeleteOldAttach(fullname); } }