1。 缺少编译器要求的成员“Microsoft.CSharp.RuntimeBinder.CSharpArgumentInfo.Create”
解决办法 :在Nuget管理其中,搜索“Microsoft.CSharp” 并安装到相应的解决方案中
data:JSON.stringify({noticeId:10086,contact:contactlist})
data:JSON.parse(JSON.stringify({noticeId:10086,contact:contactlist}))
data:{id:10086,name:"移动通信"}
这样在传递参数时候,就不用在后台再进行创建临时类接受数据了。
后台代码:
[HttpPost]
public string Notice_Log(dynamic obj )
{
List<contact> obj1 = JsonConvert.DeserializeObject<List<contact>>(Convert.ToString(obj.contact));
int id = JsonConvert.DeserializeObject<int>(Convert.ToString(obj.noticeId));
var strName = Convert.ToString(obj.noticeId);
return null;
}
}
希望对问题解决有一些帮助
原文:https://blog.51cto.com/13495873/2385099