Good day!
In PHP it is possible to assign name attribute to input elements with square brackets, like this: name="my_value[]"
and PHP automagically converts this to array on server side.
Is this possible in ASP.NET MVC? If not is there any alternative to process a bunch of checkboxes in ASP.NET MVC?
Thanks in advance!
Yes, it is possible. You might take a look at the following blog post about the convention used by the default model binder.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With