Click here to Skip to main content
12,996,388 members (71,782 online)
Click here to Skip to main content
Alternatives (5)
Add your own
alternative version


26 bookmarked
Posted 18 Apr 2011

Text box to accept only number

, 23 Apr 2011
Text box to accept only number


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) //...
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[^]


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


About the Author

Software Developer India
India India
Total DotNet/Programming Solution

I am Prasanta Banerjee. I am an Asp.Net Developer. My site:
If any body wants to prepare for interview is the good site.

| | Privacy | Terms of Use | Mobile
Web01 | 2.8.170609.2 | Last Updated 23 Apr 2011
Article Copyright 2011 by Prasanta_Prince
Everything else Copyright © CodeProject, 1999-2017
Layout: fixed | fluid