abel trinity

abel trinity

  • NA
  • 3
  • 10.8k

Enable or disable textbox based on combobox value

Dec 19 2013 4:04 AM
if (comboBox2.SelectedItem.ToString() == "Yes")
{
    textBox1.IsEnabled = false;
    textBox1.Text = "Good Health";
}
else
{
    textBox1.IsEnabled = true;
}
i have tried this and also used comboBox2.selectedvalue.equals("Yes") but the result is still the same.

Answers (2)