I have an array I build up when a row is selected in my bootstrap data table. I then need to pass this from my view to the controller which is going to fire up a partial view. However when I execute the code I get null reference exception in my controller. The code in the controller is just a placeholder for the actual use but is there to show I intend to be looping the array when it is loaded through. Any ideas as to why it would show NULL even though I can see in debug it has values.
AJAX:
function MoveSelected() {
    $.ajax({
        type: "Get",
        url: '@Url.Action("MoveSelectedRoute", "Transport")',
        data: { orders: completeArray },
        success: function (data) {
            $('#detail_MoveSelectedOrders').html(data);
            $('#modalMoveSelectedOrders').modal('show');
        }
    })
}
Controller:
public ActionResult MoveSelectedRoute(string[] orders)
{
    string OrdersToMove = string.Empty;
    foreach (string row in orders)
    {
        string orderNo = orders.ToString().PadLeft(10, '0');
        if (OrdersToMove == string.Empty)
        {
            OrdersToMove = orderNo;
        }
        else
            OrdersToMove = OrdersToMove + "," + orderNo;
    }
}

completeArrayis! But assuming it is an array of strings e.g.[ "a", 'b', 'c' ], then you need to add thetraditional: true,ajax option.data: JSIN.stringify({ orders: completeArray }),andcontentType: 'application/json; charset=utf-8',traditional: true,did. If you make this an answer I will mark it. Thanks