Простой синтаксис вызова ajax на ваш контроллер:
<input type='text' id='id1' />
$.ajax({
type: "POST",
url: '@Url.Action("ActionName", "ControllerName")', // 'NameController/GetNameUsingAjax'
contentType: "application/json; charset=utf-8",
data: { name: $('#id1').val() }, //
dataType: "json",
success: function(data) { alert('Success'); },
error: function() { alert('error'); }
});
C # код:
[HttpPost]
public ActionResult GetNameUsingAjax(string name)
{
return Json("Ajax Success + " + name);
}