try this javascript function:
function mask(textbox, e) {
var charCode = (e.which) ? e.which : e.keyCode;
if (charCode == 46 || charCode > 31&& (charCode < 48 || charCode > 57))
{
alert("Only Numbers Allowed");
return false;
}
else
{
return true;
}
}
Call function like this in textbox,
onkeypress="return mask(this,event);"