我有一个 apicontroller 将 List 返回到 ajax 函数的成功部分:
var inputdata = {
'InsPayInsuranceID': insPayInsuranceID
, 'InstallmentDistance': installmentDistance
, 'InsPayNumber': insPayNumber
, 'InsPayFirstInstallmentDate': insPayFirstInstallmentDate
, 'HasInsPayWitTax': insInsPayWitTax
, 'InsPayRatio': (insPayRatio > 0) ? insPayRatio : 0
}
$.ajax({
url: '/api/InstallmentApi',
type: 'Get',
datatype: 'json',
contentType: "application/json; charset=utf-8",
traditional:true,
data: inputdata,
success: function (result) {
$("#GridPan").load('@Url.Action("ReturnMyPartial", "Insurance")', result);
}
当在ajax成功部分调用“ReturnMYPartial”并发送“result”(从apicontroller返回列表到ajax)给它时,“ReturnMyPartial”的参数为null!
我该如何解决它并获取列表?
“ReturnMyPartial”控制器:
public ActionResult ReturnMyPartial(List<INS_InsPaymenttDetails> myIns)//int InsuranceID , string MyInsNO)
{
//// Some Codes...
return PartialView("_MyPartial", myIns);
}