RadioModel model = new RadioModel();
public ActionResult Index()
{
model.IsActive = "true";
return View(model);
}
public class RadioModel
{
public string IsActive { get; set; }
} |
@Html.EJ().RadioButtonFor(m => m.IsActive, "true")
<label for="Radio1" class="clslab">True</label>
@Html.EJ().RadioButtonFor(m => m.IsActive, "false")
<label for="Radio2" class="clslab">False</label> |
Hi Meisam,Thanks for contacting Syncfusion support.We have fixed this issue and included fix in this version (18.1.0.42). We can use any version after this release. We can also use latest version of Syncfusion.Aspnet.Mvc5 NuGet to resolve this issue. We have prepared sample for your convenience, please refer to the below link for the sample.Please let us know, if you need any further assistance.Regards,Muthukrishnan K
<h4 class="row">Select the Gender</h4>
<div class="row">
@Html.EJS().RadioButtonFor(model => model.gender, true).Label("Male").Render()
</div>
<div class="row">
@Html.EJS().RadioButtonFor(model => model.gender, false).Label("Female").Render()
</div> |
public ActionResult Index()
{
RadioButtonModel model = new RadioButtonModel();
model.gender = false;
return View(model);
}
public class RadioButtonModel
{
public bool gender { get; set; }
} |