I have two radio buttons for metric and US measurements. I load the page so the metric radio button is clicked. How do I set the two buttons so when US is clicked metric unclicks and vise versa?
相关问题
- Sorting 3 numbers without branching [closed]
- Graphics.DrawImage() - Throws out of memory except
- Carriage Return (ASCII chr 13) is missing from tex
- Why am I getting UnauthorizedAccessException on th
- 求获取指定qq 资料的方法
Set the
GroupName
property of both radio buttons to the same value. You could also try using aRadioButtonGroup
, which does this for you automatically.In order to make it work, you have to set property GroupName of both radio buttons to the same value:
Personally, I prefer to use a RadioButtonList:
Make sure their
GroupName
properties are set to the same name:I can see it's an old question, if you want to put other HTML inside could use the radiobutton with GroupName propery same in all radiobuttons and in the Text property set something like an image or the html you need.