I have a textbox bound to a numeric field in a table coming from an SQL file. The problem I have is that when I hi-light the entire field and press the delete key and tab off the current control, the value reverts back to the hi-lighted text. If the hi-lighting does not include all of the text, everything works just fine. This doesn't happen with text fields. After searching the Net for some ideas, I added the following validating handler to the textbox to get around this. Why is this necessary? Is there a better way to handle this? Am I doing something wrong? Is this because the numeric field has to have a value even if it's zero and won't accept the blank text?
Auguy
Sylvania, Ohio
Code:
If txtMiles.Text.Trim.Length = 0 then
txtMiles.Text = "0"
End If
Auguy
Sylvania, Ohio