Json数据表传递失败

我的AJAX无效,但我的JSON结果是返回行数为12,并且没有显示任何警报消息。 我在浏览器中检查,它显示500内部服务器错误。

如果检查目的我给出的字符串值是工作的数据表是不工作有任何其他方法获取数据表

我的JSON结果

public ActionResult GroupFix(string id, string name) { List Fix = new List(); Fix = entity.Tbltable.Where(x => x.Name == name && x.id == id).ToList(); return Json(Fix, JsonRequestBehavior.AllowGet); } 

我的jQuery

 $.post("/Home/GroupFix", { name: Name, id : id }, function (result) { alert('hai'); $.each(result, function (value, key) { alert('name'); $('#fixtab tbody').append(' ' + value.name + ' ' + value.id + ' '); }); }, "json"); 

好吧没有得到确切的问题,但请参阅下面的代码,我希望在我的情况下…

jQuery的

 $.ajax({ type: "POST", url: "url", data: "jason-data", contentType: "application/json; charset=utf-8", dataType: "json", success: function(msg) { var t = window.JSON.parse(msg.d); // Your code. } }); 

c#代码

 [WebMethod] public static string SendMessage() { // Code // return new JavaScriptSerializer().Serialize(); } 

确保jason key数据类型和它的名称与名为ba参数的方法的参数名称相同….

尝试使用ajaxpost::

 $.ajax({ type:'POST', Url:"GroupFix", data:{id=2,name='TestName'}, success:function(data){ for(int i=0;i