var Model = {
bool1: ko.observable(false), bool2: ko.observable(false), type: ko.observable('TCPIP'),
bigsmile: ko.observableArray([])
}
public List<Entry> bigsmile;
you should have same object in bigsmile array as you have in entry .example entry has property like thispublic class entry{
public string FirstName{ get; set;}
}
--On Wed, Jul 11, 2012 at 4:34 AM, <wallace....@gmail.com> wrote:I am having difficulty passing my object to my C# controller. everything else is coming across as it should but my array is not. any help to fix my issue would be helpful. when i pass everything though ajax i can see that all the data is there in the POST but when i hit the break point in my controller everything is there as it should be except this array.bits and pieces of the VM and Model.VM:var Model = {bool1: ko.observable(false), bool2: ko.observable(false), type: ko.observable('TCPIP'),bigsmile: ko.observableArray([])}Modelpublic bool bool1;public bool bool2;public string type;public List<Entry> bigsmile;
Nishant
More Details
public class Entry { public string table{get;set;} public string site{get;set;} public string value1{get;set;} public string value2 { get; set; }