private
void textBox_KeyPress(object
sender, KeyPressEventArgs e)
{
if (!char.IsDigit(e.KeyChar) && !char.IsControl(e.KeyChar) && !char.IsPunctuation(e.KeyChar))
e.Handled = true;
}
How you can understand the code is in the "KeyPress" event of the TextBox.
My Two Cents ...
Nessun commento:
Posta un commento