In my cshtml I'm calling this function
function checkOutGroup(listOfIDs, listOfSites, itemType, controller)
After an AJAX call that runs correctly, I have a second AJAX call that takes in some of the data from the first in the success function and calls the second AJAX call.
if(!haveCheckedOutItems)
{
alert(listOfIDs[0] + " " + listOfIDs[1]);
alert(listOfSites);
$.ajax({
type: 'POST',
url: '/WorkQueues/CheckOutMultiple',
data: {idsToCheckOut: listOfIDs, listOfSites:listOfSites, itemType : itemType, controller: controller, checkIn : false},
datatype: 'json',
beforesend: function() {},
complete: function() {},
success: function(checkedOutItems) {....
In the cs file, the WorkQueues controller has a method called CheckOutMultiple with the following method signature:
public ActionResult CheckOutMultiple(List<int> idsToCheckOut, List<int> listOfSites, string itemType, string controller, bool checkIn)
Inside this code, idsToCheckOut is null for some reason, but the other 4 things being passed have all of the correct data. I'm noting doing anything with the listOfIDs except passing a copy of it in the first method.
Any thoughts?
EDIT 1: The parsed version of the call from the chrome networknig tab is
idsToCheckOut[]:72431
idsToCheckOut[]:56361
listOfSites[]:400216
listOfSites[]:549003
itemType:Visit
controller:Visits
checkIn:false
The non-parsed version is :
idsToCheckOut%5B%5D=72431&idsToCheckOut%5B%5D=56361&listOfSites%5B%5D=400216&listOfSites%5B%5D=549003&itemType=Visit&controller=Visits&checkIn=false
EDIT 2: Somehow I've managed to get the listOfSites broken in the same fashion, and regardless of how far back I go, I can't undo the break.