How to get the data using ajax call containing model and rowFeeId together in controller.when i am using this function i am getting the model but the rowFeeId is null.
Ajaxcall
function DeleteFee(_this) {
var par = $(_this).closest('tr');var rowFeeId = par.find('.RowFeeId').val();
$.ajax({
url: '@Url.Action("DeleteInvoiceFee", "Invoice")',
dataType: "Html",
type: "POST",
traditional: true,
data:{ 'RowFeeId': rowFeeId, 'model': $('#FormSubmitInvoice').serialize() },
success: function (result) {
// alert(result);
$('#addFeedetailsSection').html(result);
},
error: function (xhr) {
alert('error');
}
//dataType :
})
}
controller
public ActionResult DeleteInvoiceFee(InvoiceViewModel model,string RowFeeId)
{
................
}
{
................
}
Manas MohapatraRank #182 · 13.2K reputationPosted Aug 5, 2015, 4:07 AM EDT
"
;Shuvojit HalderRank #2,827 · 503 reputationPosted Aug 5, 2015, 4:46 AM EDT
alert(par );
var rowFeeId = par.find('.RowFeeId').val();
Answer a question in the forums and earn +20 SHARP for every answer.
See unanswered questionsTop experts