我的 asp.net mvc 编辑视图中有以下 RadioButtons:-
<div class="editor-label">
@Html.LabelFor(model => model.InsuranceSettled)
</div>
<div class="editor-field">
@Html.RadioButton("InsuranceSettled", 1) Yes
@Html.ValidationMessageFor(model => model.InsuranceSettled)
</div>
<div class="editor-field">
@Html.RadioButton("InsuranceSettled", 0) No
@Html.ValidationMessageFor(model => model.InsuranceSettled)
</div>
但是我如何根据模型值选择所需的单选按钮,所以如果 model.InsuranceSettled 值为 0,则选择 No 单选按钮,反之亦然.. BR