S4E

S4E

  • NA
  • 33
  • 0

Trapping backspace character key presses?

Sep 21 2004 4:28 AM
This topic probably belong here, rather than the c# forum... When tying to allow only number into a text box, I added code which works BUT as a side effect, I cant actually use backspace anymore to delete typing errors :-( Any ideas on how to fix this? I want to trap the backspace to allow it. I tried stuff like: if(e.KeyChar.Equals(Keys.Back)) { ... } But this doesnt seem to work :-( Any ideas?

Answers (3)