I've been playing around with various ways to set the checked
property on a Radio Button based on an enum in the model, but can't seem to get it right...
@foreach (LeadPriceAdjustmentItem state in Model.LeadPriceAdjustmentList)
{
....
<input
type="radio"
name="direction_@state.StateCode"
id="direction_@state.StateCode"
@if (state.Direction == LeadPriceAdjustmentDirection.Up) { checked } /> Up
}
On the last }
I am being told:
Expected {
Pretty sure I'm missing something obvious, but I'm not spotting it.