Sorry but most of my searches take me to old MVC codes. Any help will be appreciated.
In MVC 6 with tag helpers, how do you code a set of checkboxes:
This is how the syntax should be in your for each asp-for should be wrapped in a string with quotation marks
@foreach (var option in Model.PhoneOptions)
{
@{ string cbId = "PhoneOption_" + @option.OptionId; }
@Html.Label(@cbId.ToString(), @option.OptionName)
@*This is causing invalid operation exception*@
@**@
}