title: System.IO.File.Delete() not working
body: <p>My code is like this</p>
  
  <pre><code> public static void Deleter()
   {
       HttpContext.Current.Response.Clear();
       HttpContext.Current.Response.ContentType = "application/pdf";
       HttpContext.Current.Response.AppendHeader("Content-Disposition", "attachment; filename=" + "name" + ".pdf");
       HttpContext.Current.Response.TransmitFile("~/media/pdf/" + "name" + ".pdf");
  
  
       if (FileExists("/media/pdf/" + "name" + ".pdf"))
       {
           System.IO.File.Delete("D:/Projects/09-05-2013/httpdocs/media/pdf" + "name" + ".pdf");
       }
       HttpContext.Current.Response.End();
  
   }
  </code></pre>
  
  <p>after executing this entire code I still can see name.pdf in the folder.No error is thrown.can any one tell me whats going wrong?</p>