If statement
VS2005
i have this code.. i don't know what's wrong! pls help..
if (checkBoxDiscounted.Enabled == false)
{
DialogResult ans = MessageBox.Show("Bill: " + totAmt.Text);
}
else
{
DialogResult ans = MessageBox.Show("Bill: " + disPrice.Text);
}
though i have the if statement, the result is still the same. always the discounted price is displayed.
2 Answers
Know the answer? Post it. Somebody with the same question will find it here.

Scott LysleRank #49 · 31K reputationPosted Jan 30, 2007, 5:26 PM EST
Seems like you'd want to see if it is checked:
if (checkBoxDiscounted.Checked == false...
waffle43 reputationPosted Jan 30, 2007, 11:02 PM EST