Pass back multiple selected Checkbox Options using Razor in MVC
问题 I am using ASP.NET MVC to populate a group of checkboxes. These checkboxes change depending on what the user selects on the previous view. I am using Razor. In the view I have: @foreach (var skills in Model.SkillsAvailable) { <input name="pack" type="checkbox" value="@skills" /> @skills<br /> } @Html.HiddenFor(m => m.SkillsSelected, new { @class = "hidden" }) I have a few others that look nearly identical to this but are single selection radio buttons. It functions by jQuery taking the