You can check it on
KeyPress event of Textbox, following code will allow you to enter only numbers
if (char.IsDigit(e.KeyChar))
e.Handled = false;
else
e.Handled = true;
Just add some logic of counter or Flag to check if char's enter.
Once number entered set flag and allow only numeric values