I am using razor and I\'m having a hard time passing an array to a controller. the array contains objects that I made and I am trying to do this:
$.ajax({
t
Add "traditional:true" parameter in your ajax.
Example:
var parentValueToPush=new Array();
$('[name=SelectedUsers]:checked').each(function () {
parentValueToPush.push($(this).val());
temp.push($(this).val());
});
$.ajax({
url: //URL,
type: 'get',
traditional: true,
dataType: 'html',
cache: false,
data: { SelectedUsers: parentValueToPush},
success: function (data) {
//Result
}
});