I have set a question up with a text box for the users answers, once they give an answer i want the text box to be disabled and a label to appear saying either correct or incorrect. But currently only one number can be typed in then the correct or incorrect labels appears. As you can see below the answer is 10. So as soon as 1 is entered, incorrect is displayed and the text box is disabled.
private void txt_2a_TextChanged(object sender, EventArgs e)
{
if (txt_2a.Text == "10")
{
lblcorrectQ2_1.Visible = true;
txt_2a.Enabled = false;
}
else
{
lblincorrectQ2_1.Visible = true;
txt_2a.Enabled = false;
}
}