Set @Html.RadioButtonFor as Checked by default
Posted
by
minchiya
on Stack Overflow
See other posts from Stack Overflow
or by minchiya
Published on 2012-09-15T12:56:14Z
Indexed on
2012/09/15
15:38 UTC
Read the original article
Hit count: 763
I am not able to set the default radio button to "Checked" ! I am using @Html.RadioButtonFor :
<div id="private-user">
@Html.RadioButtonFor(m => m.UserType, "type1", new { @class="type-radio" , **@Checked="checked"** }) 1
</div>
<div id="proff-user">
@Html.RadioButtonFor(m => m.UserType, "type2", new { @class="type-radio" }) 2
</div>
Is it possible to set a radio button as cheched using @Html.RadioButtonFor ?
Thx
© Stack Overflow or respective owner