Normally, my typical AJAX call to pass an integer ID to the server side in C# would look like this:
$.ajax({
url: '@Url.Action("PlantHistoryContent", "PlantStatus")',
data: {id: 1},
async: false,
type: "POST"
})
However, what if I want to pass a list of integers?
Let's say I have an object-list of unknown length and I need to send it as a list to the server side. The corresponding server side method would be:
public void PlantHistoryContent(List<int> id)
{
///
}
How should I modify the data parameter in my AJAX call to accommodate this new requirement?