Posted on: 11/10/2012 12:55:05 AM | Views : 392

From my FormView1, I am retritiving two labels from the ReadOnly View. There are the Customers Latitude and Longitude. If they have valid Latitude and Longitude then my routine works. However, If I try to retireve a record that doesn't exist (ie. no record for the fitlered data eg wrong customer id, or no value for name the Users is inputting)...then my Formview has a blank or empty Label.
In my routine, I am trying to test if the Label has a value or not.
I set a breakpoint and when I hover over the Label.Text field, it says that the contents is "Test of Empty".
When I try to use
if (String.IsNullorEmpty(LatLabel.Text))
or
if(LatLabel.Text =="")
Nothing happens and it still goes to the else routine and tries to Convert.ToDouble the empty field...generating an error.
How do you test for empty Label.Text ..... ie when it says that it is "Test of Empty"?
Here is my code in the routine

 Go to the complete details ...