I have two models:
Transaction:
public class Transaction
{
public string Part { get; set; }
public string Description { get; set; }
publicIEnumerable<LotNum> LotsList { get; set; }
}
LotNum:
public class LotNum
{
public string LOTNUM { get; set; }
public string LOTQTY { get; set; }
}
Controller Action:
[HttpPost]
public HttpResponseMessage ProcessTransaction(Transaction model)
{
}
When I am passing parameter to this action via Ajax call, the LotsList property values will always be blank:
var me = this,
values = me.getValues();
values.Part = 'R001';
values.Description = 'Sample Desc';
values.LotsList = [{
"LOTNUM": "L7",
"LOTQTY": "5"
},
{
"LOTNUM": "L8",
"LOTQTY": "5"
}];
Ext.Ajax.request({
dataType: 'JSONP',
url: '/Base/ProcessTransaction',
params: values,
method: 'POST',
success: function (response) {
},
failure: function (response) {
}
});
Please let me know what I am missing and how can I get my problem resolved?
Thanks.
Can you answer this question?
Answer
0 Answers