A
Alan Silver
Hello,
I have a pair of radiobuttons on a form, used to select the type of
search someone is to do...
<asp:RadioButton ID="rdbLastNDays" Text="Show tips for the last"
GroupName="rbgSearch" runat="server" />
and
<asp:RadioButton ID="rdbContainingWords" Text="Show tips containing the
word(s)" GroupName="rbgSearch" runat="server" />
Then in my code, I check like this...
if (rdbLastNDays.Checked) {
// do stuff based on the first radiobutton
} else {
// do stuff based on the second
}
The problem is that the condition in the if statement is *always* true.
In other words, rdbLastNDays is always showing as checked, even when it
isn't. The "else" part never, ever gets executed.
Anyone any idea why this is happening? TIA
I have a pair of radiobuttons on a form, used to select the type of
search someone is to do...
<asp:RadioButton ID="rdbLastNDays" Text="Show tips for the last"
GroupName="rbgSearch" runat="server" />
and
<asp:RadioButton ID="rdbContainingWords" Text="Show tips containing the
word(s)" GroupName="rbgSearch" runat="server" />
Then in my code, I check like this...
if (rdbLastNDays.Checked) {
// do stuff based on the first radiobutton
} else {
// do stuff based on the second
}
The problem is that the condition in the if statement is *always* true.
In other words, rdbLastNDays is always showing as checked, even when it
isn't. The "else" part never, ever gets executed.
Anyone any idea why this is happening? TIA