asp.net mvc - how to define a GroupName for Html.RadioButtonfor -
i working on asp.net mvc 4 .but got confused on how can specify group name table of radio-buttons . each group of radio buttons can have on button checked @ certian time. using html.radiobuttonfor
.
the "group name" determined name
attribute of field: radio buttons same name
attribute value in same "group". so, purposes of using html.radiobuttonfor
, specify same property each radio in group unique value button, i.e:
@html.radiobuttonfor(m => m.animaltype, "cat") @html.radiobuttonfor(m => m.animaltype, "dog") @html.radiobuttonfor(m => m.animaltype, "chicken")
Comments
Post a Comment