Closed vanithav closed 9 years ago
I don't think you need to set the value property to the enum value because it'll bind model just fine with that. If you really want that though for some reason that I do not know of, check out docs for RadioButtonsEnum
. You may find extension .InputHtmlAttributes()
useful.
The radio button will become selected based on the model property value. So set your Model.Placement
and corresponding radio button will be selected.
Thanks for the help. It was my mistake. I had declared it as int instead on Enum in my model and hence the issue. Now everything works fine.
Am using this and am getting the radio buttons correctly. However the value property has the name of the enum instead of the enum value. How to assign the enum value under the value property of radiobutton?
and how do i set the selected value for this?
Thanks, Vanitha.