title: how to delete file in asp.net mvc using jquery
body: <p>my script</p>
  
  <pre><code>$("#btnDelete").click(function () {
      $.post(url, { fileName: _fileNameAttachementPhoto }, function (data) {
          $("#ResumePart4").html(data);
      });
  });
  </code></pre>
  
  <p>my controllers</p>
  
  <pre><code>[HttpPost]
  public ActionResult DeleteConfirmed(string fileName)
  {
      var path = Path.Combine(Server.MapPath("~/App_Data/uploads"), fileName);
      FileInfo file = new FileInfo(path);
      if (file.Exists) {
          file.Delete();
      }
      return RedirectToAction("DeleteConfirmed");
  }
  </code></pre>
  
  <p>I tried do this but nothing happened.</p>