My AJAX is not working but my JSON result is return row count is 12 and it is not showing any alert messages. I check in browser, it shows 500 internal server error.
If checking purpose I given string value is working for data table is not working there is any other method for getting data table
My JSON Result
public ActionResult GroupFix(string id, string name)
{
List<Tbltable> Fix = new List<Tbltable>();
Fix = entity.Tbltable.Where(x => x.Name == name && x.id == id).ToList();
return Json(Fix, JsonRequestBehavior.AllowGet);
}
My jQuery
$.post("/Home/GroupFix", { name: Name, id : id }, function (result) {
alert('hai');
$.each(result, function (value, key) {
alert('name');
$('#fixtab tbody').append('<tr> <td>' + value.name + '</td> <td>' + value.id + '</td> </tr>');
});
}, "json");