I seem to have a very simple problem, but don't understand why it seems to not work atm.
I have to the keypress event attached this function.
void length_textbox_numeric_check(object sender, KeyPressEventArgs e)
{
if ((char.IsNumber(e.KeyChar)) && (char.IsControl(e.KeyChar)) )
{
e.Handled = true;
}
else
{
e.Handled = false;
}
}
it accept both character, number and spaces and so on?... but according the code should it only accept numbers and backspace? so why is it also accepting letters?