I have a simple ajax call like:
$.ajax({
url: ... ,
data: { anArray: [] },
...
});
and the controller's action:
public ActionResult Test(int[] anArray) {
...
}
seems that anArray
is null instead of empty array.
I tried also with
List<int>
string[]
object[]
but for all of above, I see null for anArray
parameter.
I read similar questions but there are related to model parameters, I don't have, here, model.
How to receive an empty array in controller's action ? What should I do ?