Alok Pandey

Alok Pandey

  • 256
  • 9.1k
  • 6m

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)