If this is ASP.NET you really need to filter events in the client part (in the Web browser). Please see the Answer by Jason C Daniels who provided very clear motivation.
I already answered similar question (cannot find it...). With Javascript, you can filter out characters not allowed in the numeric format you need:
Example:
<html>
<head>
<script type="text/javascript"></script>
</head>
<body>
<input type="text" onkeypress="filterDigits(event)"/>
</body>
</html>
This is pure HTML, just to show how the script works. When this is wrapped in ASP.NET stuff, it works the same way. This example filters out everything except decimal digits and backspace. In other cases, you will include "-", "e+-", letters, etc. You can develop a universal filter for all cases (a set of allowed characters) and pass it as yet another parameter to a function similar to the one in my sample.