function numbersonly(e) {
var unicode = e.charCode ? e.charCode : e.keyCode
if (unicode != 8) { //if the key isn't the backspace key (which we should allow)
if (unicode < 48 || unicode > 57) //if not a number
return false //disable key press
}
}
asp:TextBox ID="tbxBkgRefNo" runat="server" onkeypress="return numbersonly(event);"
Solution for the QlikView, Biztalk, DotNet and MSBI real time development problems
Search This Blog
Tuesday, July 26, 2011
How to allow only numbers into textbox using javascript, asp.net , Allow only numbers validation using javascript
Labels:
Javascript
Subscribe to:
Post Comments (Atom)
Popular Posts
-
Difference between C# var and Javascript var C# var i = 10; // implicitly typed int i = 10; //explicitly typed //Initialization is man...
-
.Net Integration with Bill Desk Payment Gateway Introduction: Now-a-days online shopping websites has become very popular, and to h...
-
function validate() { var oInput1 = document.getElementById("datepicker_Control"); if (isValidDate(oInput1)) { //proceed cod...
-
Here are some recommendations to help you to decide whether to use an interface or an abstract class to provide polymorphism for your compon...
-
1. ability to change a business process on the fly 2. Any application that implements a long-running process is a natural for workflow. Proc...
No comments:
Post a Comment