I had similar issue, it was because I forgot to have .val() when trying to access the value of the input element.
$.post('@Url.Action("Calculate", "AvailableInvestment")',
{
code: $("#calculatorCode").val(),
amount: $("#calculatorAmount").val()
},
function (data, status) {
console.log(data, status);
if (data.success == true) {
}
else {
return;
}
}
);