モデルの一部を 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