title: ajax call is not working for deleting record
body: <p>I am trying to delete record from database using Ajax call in my MVC application. Following is the code for the function calling Ajax call.</p>
  
  <pre><code>&lt;script&gt;
      function deleteRow(item, mdkey) {
          var r = confirm("Want to Delete Record?");
          if (r) {
              var row = item.parentNode.parentNode;
  
              for (var j = 0, col; col = row.cells[j]; j++) {
                  cellname = col.firstChild.name;
                  if (cellname == "md_seqno") {
                      var seqno = col.firstChild.value; 
                  } 
              }
  
              if (mdkey != '0') {
  
                  $.ajx({
                      type: "POST",
                      url: "@Session("baseurl")/ContainerManifest/DeleteDetail",
                      data: { md_key: mdkey, md_seqno: seqno },
                      success: function (result) {
                          alert("data is deleted");
                      }
  
                  })
  
              row.parentNode.removeChild(row);
              }
  
          }
  
  
  &lt;/script&gt;
  </code></pre>
  
  <p>Following is code for my function in controller</p>
  
  <pre><code>Public Function DeleteDetail(md_key As String, md_seqno As Integer) As JsonResult
  
              Dim result As Boolean = True
  
              OpenDBConnection()
              DBCmd = Globals.oraConnection.CreateCommand
  
              DBCmd.Parameters.Add("P_MD_KEY", OracleType.Char, 10).Direction = ParameterDirection.Input
              DBCmd.Parameters("P_MD_KEY").Value = md_key
  
              DBCmd.Parameters.Add("P_MD_SEQNO", OracleType.Number, 10).Direction = ParameterDirection.Input
              DBCmd.Parameters("P_MD_SEQNO").Value = md_seqno
  
              DBCmd.CommandText = "DELETE_MANIFEST_DETAIL"
              DBCmd.CommandType = CommandType.StoredProcedure
              DBCmd.ExecuteNonQuery()
  
  
              CloseDBConnection()
  
              Return Json(result, JsonRequestBehavior.AllowGet)
  
          End Function
  </code></pre>