Hi,
I have given code for asp.net only.
You have to manually type below line.
onKeyPress="return CheckNumericKeyInfo(event.keyCode, event.which);"
CheckNumericKeyInfo is a javascript function name. I have written that function in script tag. Whenever the key is pressed in textbox, CheckNumericKeyInfo function will be called. I have given the sample test page code in my comment #33095932. Please go through it once again.