title: using textbox data to check a radiobutton
body: <p>I have a textbox that gets the gender value from database. Based on the textchanged event, the radiobuttons respond accordingly.</p>
  
  <pre><code>private void txtInvisibleGender_TextChanged(object sender, EventArgs e)
  {
      if (txtInvisibleGender.Text == "Female")
          rbFemale.Checked = true;
      else
          rbMale.Checked = true;
  }
  </code></pre>
  
  <p>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?</p>