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
Have a look here RadioButtonFor in ASP.NET MVC 2 or for list Has anyone implement RadioButtonListFor<T> for ASP.NET MVC?
If you are using an Enum see this answer pass enum to html.radiobuttonfor MVC3