Check Text Box character to mark on a radiobutton

Asked

Viewed 48 times

1

I would like to know how to check whether the letter filled in a textBox is A or B as the result Checked in a RadioButton.

1 answer

5


radioButtonA.Checked = textBox.Text == "A";
radioButtonB.Checked = textBox.Text == "B";
  • I think it could also be "B" by his question, so it wouldn’t be radioButton.Checked = (textBox.Text == "A" || textBox.Text == "B"); ?

  • The idea is the same, but thanks for the remark =D

  • Hahaha for nothing :) I will erase mine and leave only yours, because it is simpler

Browser other questions tagged

You are not signed in. Login or sign up in order to post.