How do I check for a null value before going into other conditions?
Code:
if (Convert.ToInt32(lblTextOne.Text) > 0 & Convert.ToInt32(lblTestTwo.Text) > 0 & Convert.ToInt32(lblTestThree.Text) > 0)
{
}
I get the following error message
from the code above -- How do I check for an integer before the condition.
In the data a couple of the database values are "NULL" this is casuing the application to fail. How do I fix this problem?
Input string was not in a correct format
Line 145: if (Convert.ToInt32(lblTextOne.Text) > 0 & Convert.ToInt32(lblTestTwo.Text) > 0 & Convert.ToInt32(lblTestThree.Text) > 0) Go to the complete details ...