@using MileageTraker.Web.Utility
@model Enum
@{
    var listItems = Model.GetSelectListItems();
	var prefix = ViewData.TemplateInfo.HtmlFieldPrefix;
    ViewData.TemplateInfo.HtmlFieldPrefix = string.Empty; 
    var index = 0;
    
    foreach (var li in listItems)
    {
        var fieldName = string.Format(System.Globalization.CultureInfo.InvariantCulture, "{0}_{1}", prefix.Replace('.', '_'), index++);
        <label class="radio">
            @Html.RadioButton(prefix, li.Value, li.Selected, new { @id = fieldName }) 
            @li.Text
        </label>
    }
    ViewData.TemplateInfo.HtmlFieldPrefix = prefix;
}