I\'m facing a problem when calling an action on a controller with an argument
In the controller i have following action:
[HttpPost]
public ActionResu
You have to just remove content type and also better if you pass controller name in URL:
$.ajax({
url: '@Url.Action("UpdateData","YourControllerName")',
dataType: "json",
type: "POST",
cache: false,
data: {month:'may'} ,
success: function (data) {
if (data.success) {
alert(data.message);
}
},
error: function (xhr) {
alert(xhr.responseText);
}
});