System.IO.File.Delete(Server.MapPath("~/"+imgPath));
=================================================
-
C# code
-
if (System.IO.File.Exists(System.Web.HttpContext.Current.Server.MapPath(Path))) { System.IO.File.Delete(Path); }
参考:http://topic.csdn.net/u/20080319/16/14d03d7b-b285-4e8a-97ff-d4423f4a775e.html