我正在尝试通过 ajax 调用发送模型的一部分,但是就像我下面的代码一样,它不起作用。我怎么能传递这个对象呢?
$.ajax({
url: "/Controller/Action",
type: "GET",
data: @Model.Company,
success: function (result) {
$('#myDiv').html(data);
}
});
这是我的 JS 输出的内容:
MyProj.Domain.Entities.Company
这是我的错误:
Uncaught ReferenceError: MyProj is not defined