Strongly-Typed radiobutton in ASP.Net MVC
Hi guys, I created an enum and a viewmodel for my strongly-typed radiobutton. But I wonder, why is it, that the first radio button is always checked or selected? Is it possible to unchecked it without using a jquery?
3 Answers
Know the answer? Post it. Somebody with the same question will find it here.

Sunny SharmaRank #223 · 11.1K reputationPosted Oct 7, 2013, 12:07 AM EDT
Set it to false instead of true then.
In my previous post I meant that you need to set checked property to true for the button you want to see checked by defauilt.
Hope you got the pioint!
Happy Coding :)
Sunny SharmaRank #223 · 11.1K reputationPosted Oct 6, 2013, 11:32 PM EDT
Add a checked HTML attribute to the radio button control.
try this:
@Html.RadioButtonFor(m => m.WantTojoin, true, new { @checked = "checked" }) HTH :)boycoto132 reputationPosted Oct 6, 2013, 11:40 PM EDT