Hi,
Please find the below code with textbox validation has only numeric value using javascript with aspx textbox.
<script type="text/javascript">
function ValidateCCNum(ccNum) {
var ccno = ccNum.value;
if (isNaN(ccno)) {
alert("Textbox value should be numeric");
ccNum.focus();
ccNum.value = null;
return false;
}
return true;
}
</script>
</head>
<![CDATA[<%--In Aspx file call this function as below--%>]]>
<asp:content runat="server" id="BodyContent" contentplaceholderid="MainContent" xmlns:asp="#unknown">
<asp:textbox id="txtCCDNo" onblur="ValidateCCNum(this)" runat="server"> </asp:textbox>
</asp:content>
Run this code in aspx client page