T
tshad
I have 2 radio buttons set to yes or no:
<asp:RadioButton id="RelocateYes" Checked="true" GroupName="Relocate"
runat="server" Text="Yes"/>
<asp:RadioButton id="RelocateNo" GroupName="Relocate" runat="server"
Text="No"/>
This is set as a group so that you can only choose one button. If you
choose the other button, the first button will unselect.
This doesn't seem to work if you do it programmatically.
For example, if I do:
if not (emailReader("Relocate") is DBNull.Value) then
RelocateYes.Checked = emailReader("Relocate")
end if
Assume that RelocateYes is selected, so RelocateNo is not.
If the data is 0, then RelocatYes will be unchecked. I would assume that
RelocateNo would be checked - but it doesn't. Is there a way have it behave
this way, or do I have to set both buttons manually?
Thanks,
Tom
<asp:RadioButton id="RelocateYes" Checked="true" GroupName="Relocate"
runat="server" Text="Yes"/>
<asp:RadioButton id="RelocateNo" GroupName="Relocate" runat="server"
Text="No"/>
This is set as a group so that you can only choose one button. If you
choose the other button, the first button will unselect.
This doesn't seem to work if you do it programmatically.
For example, if I do:
if not (emailReader("Relocate") is DBNull.Value) then
RelocateYes.Checked = emailReader("Relocate")
end if
Assume that RelocateYes is selected, so RelocateNo is not.
If the data is 0, then RelocatYes will be unchecked. I would assume that
RelocateNo would be checked - but it doesn't. Is there a way have it behave
this way, or do I have to set both buttons manually?
Thanks,
Tom