G
Guest
In a text box I want to allow only numbers and backspace.
Currently the code I have only allows numbers. How do I also allow backspace?
if (!Char.IsDigit(e.KeyChar))
{
e.Handled = true;
}
Currently the code I have only allows numbers. How do I also allow backspace?
if (!Char.IsDigit(e.KeyChar))
{
e.Handled = true;
}