I have a weird behavior using @Html.RadioButtonFor Extension Method. I am using a foreach loop to create a list of RadioButton and By ternary operator. I am try
@Html.RadioButtonFor
The precedence of operators is causing the problem here; as equality comes before comparison, the phrase will be evaluated as
(@checked = item.Default) ? "checked" : ""
whereas you want it to be
@checked = (item.Default ? "checked" : "")