The second parameter to the
RadioButtonFor[
^] method is the value of the selected radio button.
You are passing an anonymous object, which looks more like the HTML attributes for the radio button.
Change your code to use the method properly. For example, assuming the
NdpIndicator
property is a
bool
:
@Html.RadioButtonFor(model => model.NdpIndicator, true, new { @class = "radio-inline", id = "A" })
@Html.Label("A", "Active")
@Html.RadioButtonFor(model => model.NdpIndicator, false, new { @class = "radio-inline", id = "B" })
@Html.Label("B", "Inactive")