Sometimes a validator control is overkill, especially when you are dynamically creating all your web controls and just want a simple restriction. Below is a little javascript to require numeric input only:
HtmlInputField myField = new HtmlInputField();
myField.Attributes.Add("onkeyup", "this.value=this.value.replace(/[^\\d]*/gi,\"\");");