将复选框列表传递到视图中并取出IEnDigable
AllItems
<div id="item-list"> @foreach (var item in Model.AllItems) { <div class="ui field"> <div class="ui toggle checkbox"> <input type="checkbox" id="item-@item.ItemID" name="Items" value="@item.Active" /> <label for="item-@item.ItemID">@item.ItemName</label> </div> </div> }</div>
临摹微笑