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
Client side:
$.ajax({
type: "POST",
url: "HomePage/HandleOperations",
data: {operations: operationCollection},
success: function (data) { alert("SUCCESS"); }
});
and declare a class server side like this:
public class Operation
{
public int Index;
public string Source;
public string Target;
public int AddOrDel;
}
then you can have this action:
public void HandleOperations(Operation[] operations)
{
}