title: checked the Return the value of ratiobutton from gridview using select command
body: <p>net C# 
  and I'm using radiobutton (MALE and FEMALE) now I can get the value of my two radiobutton and save to database 
  and I'm using datagridview and what I want is when I select the row from datagrid and when I select a person's name age and gender it will show  to the textbox and edit it .. I can save the name and age but not the gender because I'm using the radio button.. I tried to use <code>male_b.checked=true;</code> but it doesn't work </p>
  
  <p>here's my code </p>
  
  <pre><code> protected void GridView1_SelectedIndexChanged(object sender, EventArgs e)
      {
          GridViewRow row = GridView1.SelectedRow;
  
          T_firstName.Text = (row.FindControl("lbl_Firstname") as Label).Text;
          T_middlename.Text = (row.FindControl("lbl_Middlename") as Label).Text;
          T_lastname.Text = (row.FindControl("lbl_Lastname") as Label).Text;
          T_age.Text = (row.FindControl("lbl_Age") as Label).Text;
          ID_label.Text = (row.FindControl("lbl_ID") as Label).Text;
          string gender= (row.FindControl("lbl_Sex") as Label).Text;
          if (gender == "MALE")
          {
              male_b.Checked = true; 
          }
          else if (gender=="FEMALE")
          {
              female_b.Checked = true; 
          } 
      }
  </code></pre>
  
  <p>that's the only problem.. thank you</p>