I've snipped some code out but essentially I have 3 radio buttons
<asp:RadioButton ID="radBlue" runat="server" GroupName="radOptions" />
<asp:RadioButton ID="radRed" runat="server" GroupName="radOptions" />
<asp:RadioButton ID="radGold" runat="server" GroupName="radOptions" />
which are layed out seperately within <div>s so I can't use RadioButtonList and ListItem.
I'm trying to get and set the value in the c# code behind, which I believe is done using
radBlue.Checked = true;
which I'm using in the pageload event, but radGold (or whichever is the last of the options) is always checked when the page finally renders.
When I try reading the page when I save via an asp:button, no matter which radio button is actually checked the code thinks that radGold.checked == true.
Can anyone tell me what I'm missing?
Thanks
<asp:RadioButton ID="radBlue" runat="server" GroupName="radOptions" />
<asp:RadioButton ID="radRed" runat="server" GroupName="radOptions" />
<asp:RadioButton ID="radGold" runat="server" GroupName="radOptions" />
which are layed out seperately within <div>s so I can't use RadioButtonList and ListItem.
I'm trying to get and set the value in the c# code behind, which I believe is done using
radBlue.Checked = true;
which I'm using in the pageload event, but radGold (or whichever is the last of the options) is always checked when the page finally renders.
When I try reading the page when I save via an asp:button, no matter which radio button is actually checked the code thinks that radGold.checked == true.
Can anyone tell me what I'm missing?
Thanks