I have an if statement that says this:
if abc.text is greater than or equal to xyz.text, then lblerrormessage.text and lblabc.text shows error messages, else lblerrormessage and lblabc shows nothing.
but sometimes abc.text and xyz.text will be 0 and thats fine. How do I write that?
Any help is appreciated! Thanks.
if abc.text is greater than or equal to xyz.text, then lblerrormessage.text and lblabc.text shows error messages, else lblerrormessage and lblabc shows nothing.
but sometimes abc.text and xyz.text will be 0 and thats fine. How do I write that?
Code:
if (Convert.ToDouble(abc.Text) >= Convert.ToDouble(xyz.Text))
{
lblerrorMessage.Text = "Please correct the following:";
lblabc.Text = "Must be less than.";
return;
}
else
{
lblerrorMessage.Text = "";
lblabc.Text = "";
}
Any help is appreciated! Thanks.