javascript - Inexplicable MVC model data alteration -
i have model object contains list of objects have 3 numeric fields , 1 string field, similar following: public class datamodel { public list<dataitemmodel> dataitems { get; set; } } public class datamodel { public string comment { get; set; } public decimal value { get; set; } public int id { get; set; } public int integervalue { get; set; } } the view has table allows user set each item's value , comment fields ( id generated data layer , integervalue derived value ). user can add , delete items collection via ajax, using jquery post() method, webpage being partially updated using html() . the issue i'm seeing if have list of comment/value pairs so: item 1, 1.00 item 2, 2.00 item 3, 3.00 item 4, 4.00 item 5, 5.00 and delete third item via webpage, controller correctly changes data to: item 1, 1.00 item 2, 2.00 item 4, 4.00 item 5, 5.00 and returns new html using partialview() . when webpage updated, model somehow transformed be...