TextBox:Accept Only Numeric,Characters and Integers on KeyPress

HTML Markup:

For Contact Number you can use this code, first add JavaScript and call it onkeypress.

  1. <script type="text/javascript">  
  2.     function isNumberKey(evt)  
  3.     {  
  4.         var charCode = (evt.which) ? evt.which : event.keyCode  
  5.         if(charCode > 31 && (charCode < 48 || charCode > 57)) return false;  
  6.         return true;  
  7.     }  
  8. </script>  
  9. <asp:Label>Contact No.</Label>  
  10.     <asp:TextBox ID="txtClientContact" autocomplete="off" runat="server" onkeypress="return isNumberKey(event)" pattern="\+?\d[\d -]{4,9}\d">  
  11. </asp:TextBox>  
For Integers values you can use following,first add JavaScript and call on keypress.
  1. <script language="Javascript" type="text/javascript">  
  2.     function onlyNos(e, t)  
  3.     {  
  4.         try  
  5.         {  
  6.             if(window.event)  
  7.             {  
  8.                 var charCode = window.event.keyCode;  
  9.             }  
  10.             else if(e)  
  11.             {  
  12.                 var charCode = e.which;  
  13.             }  
  14.             else  
  15.             {  
  16.                 return true;  
  17.             }  
  18.             if(charCode > 31 && (charCode < 48 || charCode > 57))  
  19.             {  
  20.                 if(charCode === 46) return true;  
  21.                 else return false;  
  22.             }  
  23.             return true;  
  24.         }  
  25.         catch(err)  
  26.         {  
  27.             alert(err.Description);  
  28.         }  
  29.     }  
  30. </script>  
  31. <asp:TextBox ID="txtAmount" autocomplete="off" runat="server" pattern="^[1-9][\.\d]*(,\d+)?$" onkeypress="return onlyNos(event,this);"></asp:TextBox>  
For Email verification you can add pattern in TextBox,
  1. <asp:TextBox ID="txtClientEmail" autocomplete="off" placeholder="Enter Valid Email Id" runat="server" pattern="^\w+([-+.']\w+)*@\w+([-.]\w+)*\.[a-zA-Z]{2,3}$"></asp:TextBox>