I need to built a list of radio buttons, based on data I return from my DB. Each button needs to have a value associated with it that I can get out based on the selected button.
Ideally I would just use the RadioButtonList control, however, I need to have a very custom layout which a RadioButtonList doesn’t appear to be able to handle.
An alternative would be to create individual RadioButtons and wrap them in a Panel to group them. However, there doesn’t appear to be a Value property on a RadioButton?
Is there an alternative way to set a value to a RadioButton control? Alternatively, a way to completely customise the RadioButtonList output.
At the moment, I’m thinking I might have to resort to using HTML radio buttons with runat="server", must be a better way…?
You could create your own radio button class which extends the standard one and adds a value property: