添加:spa
<div class="checkbox"> @Html.RadioButtonFor(Model => Model.Sex_State, true, new { @id = "Sex_State", @name = "Status" }) 男 @Html.RadioButtonFor(Model => Model.Sex_State, false, new { @id = "Sex_State", @name = "Status" }) 女 </div>
顯示:code
@{ if (item.Sex_State == true) { <p>男</p> } else { <p>女</p> } }