How about using javascript code? add this js event
onkeypress=""return allowOnlyNumber(event);
then all you need is
function allowOnlyNumber(evt)
{
var charCode = (evt.which) ? evt.which : event.keyCode
if (charCode > 31 && (charCode < 48 || charCode > 57))
return false;
return true;
}