如何设置selected = true
并禁用此单选按钮
<%= Html.RadioButtonFor(m =>m.AddToLevel ,new {id = "rdSameas" }) %>
答案 0 :(得分:7)
第二个参数是所选的值true
:
<%= Html.RadioButtonFor(m => m.AddToLevel, true, new { id = "rdSameas", disabled = "disabled"}) %>
答案 1 :(得分:0)
<%= Html.RadioButtonFor(m =>m.AddToLevel ,new {id = "rdSameas", checked = "checked", disabled = "disabled" }) %>