disable and select asp.net mvc Html.RadioButtonFor
How can i set selected = true
and disable this radio button
<%= Html.RadioButtonFor(m =>m.AddToLevel ,new {id = "rdSameas" 开发者_如何学JAVA}) %>
The second parameter is the value: true
for selected:
<%= Html.RadioButtonFor(m => m.AddToLevel, true, new { id = "rdSameas", disabled = "disabled"}) %>
<%= Html.RadioButtonFor(m =>m.AddToLevel ,new {id = "rdSameas", checked = "checked", disabled = "disabled" }) %>
精彩评论