Feb 11, 2015, 8:12 AM
How to bind Value to Radiogroup from database
can any one suggest me how to set Value on Radiogroup from database via controller
here is my code
here is my code
@(Html.X().RadioGroup()
.ID("RFont")
.LabelWidth(90)
.Width(300)
.FieldLabel("Font")
.AutomaticGrouping(false)
.Items(
Html.X().Radio().ID("RMedium").Name("RadioFont").InputValue("0").BoxLabel("Small"),
Html.X().Radio().ID("RBigger").Name("RadioFont").InputValue("1").BoxLabel("Large")
)
)
My value for the control will be either 0 or 1, suggest me how to set it on controller.
Last edited by Dimitris; Feb 13, 2015 at 12:44 PM.
Reason: formatting