The if statement is checking the labels, not the textboxes - was this intentional?
Code:if (lblFatCaloriesValue.Text == "" || ((lblCarbCaloriesValue.Text == "") || (dblTotalCalories <= 0))) { MessageBox.Show("Please enter a valid number", "Missing Information", MessageBoxButtons.OK, MessageBoxIcon.Exclamation); }




Reply With Quote