I declare a radio button group on the page inside a list-type control (or a @foreach loop). Radio button group is bound to a model property and needs to have its name prefixed with an index like so: "Model[0].PropOne". When I use @Html.Name helper with other controls like a checkbox it works right, but with radio buttons it produces a name like this - Model_0__PropOne. So, looks like it replaces brackets and dots with an underscore. What do I need to do to get it to work?
Hi Nikita,
Thank you for the details provided.
Yes, you are totally correct - this behavior is expected as the Button Group has its collection of options. The component bonded to the Model should work out of the box.
If further manipulations of the options are needed, feel free to get them and use their properties via Regular Expressions.
If you could provide a runnable sample with the desired points explained, I could try to achieve the requirements for the case.
Looking forward to hearing back from you.
Kind Regards,
Anton Mironov