2
Answers

Enable or disable textbox based on combobox value

Photo of abel trinity

abel trinity

11y
9.1k
1
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)