Alok Pandey

Alok Pandey

  • NA
  • 9.3k
  • 6.7m

Back Space Button is not working

Aug 16 2011 7:21 AM
Hi,

I am trying to provide validation on textbox that it accept only digits. it executes properly by following c# code
on textbox keypress event,
 
  if(!(char.IsDigit (e.KeyChar)))
  {
  e.Handled = true;
  }


But back space button is also not working on this. I Want, Back Space button work on textbox.
  Where is the Problem In my Code?




Thanks in Advance

Answers (10)