Textbox Validation question
Hello guys, I wrote this code to validate a textbox... What I want is that the textbox only receive value with 0 or greater or null... The code I wrote below only work with value 0 or greater but it wouldnt' work when I leave the textbox null. Please advise what to do. Thank you.
Private Function isValidPrice2(ByVal Price2 As String) As Boolean
Dim Result As Boolean = False
If IsNumeric(Price2) Then
If Price2 > 0.0 Or Price2 = "null" Then
If CType(Price2, Double) = Price2 Then
Result = True
End If
End If
End If
Return Result
End Function