0
我試圖做從MVC3視圖後,它不是我的控制工作正常,但是當我從海報海報post方法和jquery post方法有什麼區別?
在這裏發表相同的JSON正常工作是jQuery代碼
var lineas = $("#articulosIngresadosTable").getRowData();
var model = {
ObraSocialId: $("#idObraSocialTextBox").val(),
Lineas: lineas
};
$.ajax({
type: 'POST',
url: '@Url.Action("Nueva", "Factura")',
data: model,
success: function (data) { alert(JSON.stringify(data)); },
dataType: "json"
});
我仔細檢查和對VAR模型的JSON是一樣的我是從海報
這裏使用的是JSON:
{"ObraSocialId":"1","Lineas":[{"codigo":"1000","Descripcion":"Articulo 1000","cantidad":"1","importe":"0","descuento":"0","importeDescuento":"0","obrasocial":"","id":"1"},{"codigo":"2000","Descripcion":"Articulo 2000","cantidad":"1","importe":"0","descuento":"0","importeDescuento":"0","obrasocial":"","id":"2"}]}
預先感謝!