using fiddler here is the posted data:
first.Id=1&first.Value=This+is+my+first+name.&second.Id=2&second.Value=The+second+one.
on the controller:
[HttpPost]
public void Set(EditSettings[] settings)
{
//the settings is always null
}
i have tried a lot of questions here at SO but none of them worked!
since i had just two settings i managed to seperate the parameters and use a falttened object in my ajax post request.
now my question is what type of string should be passed to the model binder instead of my initial string? what should be changed there since there is no “first” or “second” parameter names?
you can not access these values with array in the controller action , because they haven’t sent with an index.u can do the following to send data as array