Click here to Skip to main content
Click here to Skip to main content
Alternatives (5)

Text box to accept only number

, 23 Apr 2011 CPOL
Text box to accept only number

Alternatives

Members may post updates or alternatives to this current article in order to show different approaches or add new features.

27 Dec 2011
Nigam Patel
Here is a really simple code for a numeric text box and it will work in all browsers. Only works for web applications. function CheckNumeric(e) { if (window.event) //...
16 Jan 2012
DrABELL
This "Decimal TextBox" is an extension to the original solution, which allows entering the negative sign (chr 45) and decimal point (chr 46) in addition to the digits 0...9 and backspace (chr 8) using just client scripting to perform the client-side validation: <script...
28 Apr 2011
code in play
I have created a jQuery code to achieve this/*User Options --allowHex:Allow hexadecimal number default falseallowNeg:Allow negative default falseonlyInteger:did not allow decimal default true*/$(function () { var mergedOptions = {}; var common = { allowHex:...
24 Apr 2011
Sander Rossel
The following Class is a TextBox for WinForms that only accepts 0, 1, 2, 3, 4, 5, 6, 7, 8, 9 (numerics) or backspace as input. Not using regular expressions.using System;using System.Collections.Generic;using System.Linq;using System.Text;using System.Windows.Forms;namespace...
29 Dec 2011
Manish K. Agarwal
WinForms TextBox to accept numbers in a range[^]

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

Share

About the Author

Prasanta_Prince
Software Developer India
India India
http://devcorners.com/
Total DotNet/Programming Solution
 
I am Prasanta Banerjee. I am an Asp.Net Developer. My site: http://devcorners.com/
Email: prasanta.it@hotmail.com
If any body wants to prepare for interview http://guru-code.blogspot.com/ is the good site.

| | Privacy | Mobile
Web03 | 2.8.141022.2 | Last Updated 23 Apr 2011
Article Copyright 2011 by Prasanta_Prince
Everything else Copyright © CodeProject, 1999-2014
Terms of Service
Layout: fixed | fluid