I'm getting this error...Operator is not valid for type 'DBNull' and string
"". What is happening is that I'm calling a stored procedure to use the
email address to recover a forgotten username. If the email does not exist
then I get the above error. After I execute the stored procedure I try and
apparenty this is not catching the error. Should I use a Try...Catch? What
is the correct way to check for nulls in ASP.NET?
If Not myCommand.Parameters("@LOGIN_NAME").Value = "" Then
returnLogin = myCommand.Parameters("@LOGIN_NAME").Value
Else
lblMessage.Text = "Email does not exist in system. Re-enter email or contact
BRM Support"
End If