I'm trying to make a label change when I click a button, but for some reason it is not working. It was working until I made a little change, and i do not know what to do anymore. Can some one help? Here is the code:
private void btnColorChange_Click(object sender, EventArgs e)
{
if (lblTvalue.Text = "1")
{
lblTest.Text = "$0.00";
}
if (lblTvalue.Text = "2")
{
lblTest.Text = "$2.00";
}
}
Make sure you put 2 "equals" inside the IF(x.x == x) like: