Close, but not quite how it works. Here is a sample of how it should look.
$.ajax({
type: 'GET',
url: '/YourController/YourMethod',
dataType: 'json',
async: false,
data: { arg1: 'arg1value',
arg2: 'arg2value'
},
success: function (result) { alert(result); },
error: function (jqXHR, textStatus, errorThrown) {
alert( 'An error occured while loading: ' + textStatus + ": " + errorThrown + ": " + jqXHR.responseText );
}
});
[HttpGet]
public JsonResult YourMethod(string arg1, string arg2)
{
string yourResult = "Some soft of result.";
return Json(yourResult, JsonRequestBehavior.AllowGet);
}