I have one ajax call :
var arr = [1, 2, 3];
$.ajax({
url: "http://localhost:14506/api/Lanche/Montar",
type: "POST",
data: { id: arr },
dataType: "json",
async: false,
success: function (data) {
alert(data);
}
});
Sending to one WebApi Controller
public decimal Montar( int[] id )
{
if (id != null)
{
// code here
}
return 0;
}
But always this id comes with 0 items, what´s wrong ?