I have a textbox that gets the gender value from database. Based on the textchanged event, the radiobuttons respond accordingly.
private void txtInvisibleGender_TextChanged(object sender, EventArgs e)
{
if (txtInvisibleGender.Text == "Female")
rbFemale.Checked = true;
else
rbMale.Checked = true;
}
The problem is that when the data in textbox is Female, then why is the Male radiobutton being checked? It doesn't check based on the data from the textbox. How do I make this work?