You don't use the word "OR" in C#, you use the logical OR operator "||" instead:
private void button1_Click(object sender, EventArgs e)
{
if (textBox1.Text == "In Progress" || textBox1.Text == "Resolved")
{
label1.Text = textBox1.text;
}
else
{
label1.Text = "Fill Valid word in Status, eg: In Progress or Resolved,";
return;
}
}
But a better idea is to do it the other way round:
private void button1_Click(object sender, EventArgs e)
{
if (textBox1.Text != "In Progress" && textBox1.Text != "Resolved")
{
label1.Text = "Fill Valid word in Status, eg: In Progress or Resolved,";
return;
}
label1.Text = textBox1.text;
}
That way, you keep your validations at the top of the method where it is easy to see what is required, and the rest of the method isn't further indented.