title: How to send ajax call to server without expecting a return result?
body: <p>I   pass inputs to actionResult which will use it to  create a new object and insert it to database using entityFramework and dont want to return anything.</p>
  
  <p></p>
  
  <pre><code>    $(document).ready(function () {  
          $("#Add").click(function () {
              var EmployeeeId = $("#EmployeeId").val();
              var Phone =$("#Phone").val();
              var Email = $("#Email").val();
              var Address = $("#Address").val(); 
          var UserModel =
  {
      "EmployeeId": EmployeeeId,
      "Phone": Phone,
      "Address": Address,
      "Email": Email
  
  };    $.ajax({url: '@Url.Action("AddNewContactList","Home")',
  
              type: "POST",
              dataType: "json",
  
              data: JSON.stringify(UserModel),
              contentType: 'application/json; charset=utf-8',
  
  
                          success: function (result) {
  
                             //Doesnt Matter
  
                          },
                          error: function (xhr, ajaxOptions, thrownError) {
  
                              alert("Failed");
                          }
  </code></pre>
  
  <p>And here is my Controller Code with the controller action being called</p>
  
  <pre><code> [HttpPost]
      public ActionResult AddNewContactList(ContactList c)
      {
          DbContext m = new DbContext();
          m.ContactList.Add(c);
          m.SaveChanges();
          return View();
  }
  </code></pre>