Seshu B

Seshu B

  • NA
  • 442
  • 145.3k

radio button for two diffrent bool property in MVC5

Sep 1 2017 10:10 AM
hi all,
i have 2 properties in model and two radio buttons in view page and after selecting radio button value as true, model value getting as false always ,
this is my problem , i have tried a lot still i didn't find soultion
please provide soultion regarding this.
 
i have tried below code
 
Model :-
 
public bool AdministratorRefundAccess { get; set; }
public bool EmployerRefundAccess { get; set; }
 
View :-
 
@Html.RadioButtonFor(m => m.AdministratorRefundAccess, new { @Name = "SelectedValue" })
@Html.RadioButtonFor(m => m.EmployerRefundAccess,new { @Name = "SelectedValue" }) 

Answers (1)