I got the following Html:
<div class="horizontalRadio">
<label for="SearchBag.DisplayTypeChips" id="DisplayTypeChipsLabel">
<%=ViewData.Model.T9nProvider.TranslateById("CommonWeb.Chips")%>
</label>
<%=Html.RadioButton("displayType", DisplayTypes.Chip,
Model.DisplayType.Equals(DisplayTypes.Chip.ToString(), StringComparison.InvariantCultureIgnoreCase),
new { @id = "SearchBag.DisplayTypeChips" })%>
</div>
<div class="horizontalRadio">
<label for="SearchBag.DisplayTypeGrid" id="DisplayTypeGridLabel">
<%=ViewData.Model.T9nProvider.TranslateById("CommonWeb.Grid")%>
</label>
<%=Html.RadioButton("displayType", DisplayTypes.Grid,
Model.DisplayType.Equals(DisplayTypes.Grid.ToString(), StringComparison.InvariantCultureIgnoreCase),
new { @id = "SearchBag.DisplayTypeGrid" })%>
</div>
Whenever Model.DisplayType is "grid" everything is fine, the second button is checked.
When the value is "chip", nothing is checked. In the debugger I can see that Model.DisplayType.Equals(DisplayTypes.Chip.ToString()) is true. When I change the name of the buttons to something different, it works too.
Happens I don't want to change the name because this is the name that makes sence, this is the name I'm using throughout my application ...
Any ideas WHY this name is evil?