开发者

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" }) %>
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜