try this.. :)
Javascript
var specialKeys = new Array();
specialKeys.push(8);
function IsNumeric(e) {
var keyCode = e.which ? e.which : e.keyCode
var ret = ((keyCode >= 48 && keyCode <= 57) || specialKeys.indexOf(keyCode) != -1);
return ret;
}
HTML
<asp:textbox runat="server" id="txtDemo" text="12345" onkeypress="return IsNumeric(event);" xmlns:asp="#unknown" />