I have not gone through the code but these lines makes no sense
if (radioButtonMale.Checked)
{
Gender = "Male";
}
else
{
Gender = "Female";
}
radioButtonMale.Checked = dt.Rows[0]["Gender"].ToString();
Instead of checking
radioButtonMale.Checked
, you should check for the received value. If its Male,set
radioButtonMale.Checked=true;
It only accepts boolean values.
Regards..