<pre lang="cs">@{ bool val = false; var isChecked = (val == true) ? new { @Checked = "checked" } : null; } @Html.RadioButtonFor(x => x.Status, "Male",new Dictionary<string,object>{{"id","GenderRdoButton"},{isChecked}})
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)