title: How to define URL in Javascript to call ActionResult methode which resides in a controller
body: <p>i have created web application in MVC using Entity Framework to perform CRUD operations. in when i Delete any record it takes me to Delete View and then i am able to Delete that Record. but instead of doing that i want to have a alert box stating "Are you sure you want to delete this record" through java script and then without talking user to another page i want to delete the record.</p>
  
  <p>i am using following option but its not helping...</p>
  
  <pre><code>$(function () {
      $('table.dataList tbody a[linktype="Delete"]').click(function (e) {
          e.preventDefault();
          $.ajax({
              type: 'POST',
              url: '/DepartmentController/DeleteConformed/',
              dataType: 'script',
              success: function () {
                  alert('Are you sure you want to Delete this Department');
              },
              error: function (req, status, err) {
                  alert(err);
              }
          });
      });
  </code></pre>
  
  <p>It is caching error stating "Not Found". Am i doing any mistake while stating URL.</p>