1
如何使用ajax post(ASP NET MVC 4)獲取字段[NotMapped]屬性中的值?如何使用ajax post(ASP NET MVC 4)獲取字段[NotMapped]中的值
$('#btnSalvarParcela').click(function() {
$.ajax({
url: '@Url.Action("CadastroLancamentoParcelar", "LancamentoReceitaDespesa")',
type: 'POST',
data: $("#LancamentoForm").serialize(),
cache: false,
context: this,
success: function (result) {
$("#partialLancamentoReceitaDespesa").html(result);
mudarComboTipoLancamento();
}
});
});
( 「#LancamentoForm」)序列化() - [notmapped]會控制器作爲空領域,是對檢索這些值?
您可能可以使用Request.QueryString屬性關閉上下文來獲取所有值。 –
什麼是(「#LancamentoForm」)?是一個文本框的價值?隱藏領域?因爲它看起來像你沒有正確傳遞 – CSharper