I want to disable a textbox after user has inserted a value. I have tried playing with the "KeyPress" property but the first digit I type in is also the "KeyPress", so it locks on the first character. Maybe I can get the textbox to lock after pressing Enter or using Tab. What will be the best way to do this?
4 Answers
It sounds like you want to disable the box after the person leave it. (I assume that from your Enter/Tab option.) If so, look into the TextBox.LostFocus event.
TextChangedevent instead.