Try this
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<script src="jquery-1.10.2.js" type="text/javascript"></script>
<script type="text/javascript">
function isNumberKey(evt, obj) {
var charCode = (evt.which) ? evt.which : event.keyCode
var value = obj.value;
var dotcontains = value.indexOf(".") != -1;
if (dotcontains)
if (charCode == 46) return false;
if (charCode == 46) return true;
if (charCode > 31 && (charCode < 48 || charCode > 57))
return false;
return true;
}
</script>
</head>
<body>
<form id="frm" runat="server">
<asp:TextBox ID="txt" onkeypress="return isNumberKey(event,this)" runat="server"></asp:TextBox>
</form>
</body>
</html>