473,503 Members | 1,772 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Restrict non numeric characters in a text box

I want to restrict users entering non numeric characters
in a text box
How can I do this?
If there is any code sample please answer or email I'll be
very glad
Thank you

Jul 21 '05 #1
2 2529
I wrote this a while back and I think the grammar needs proofed before we
launch, but the code works.
http://www.knowdotnet.com/testsite/a...textboxes.html

HTH,

Bill
"Sanka" <sg****@hotmail.com> wrote in message
news:07****************************@phx.gbl...
I want to restrict users entering non numeric characters
in a text box
How can I do this?
If there is any code sample please answer or email I'll be
very glad
Thank you

Jul 21 '05 #2
Apart from using a textbox, you could use the "NumericUpDown" control which
not only restricts the entry to numbers, but gives you a neat up/down arrows
to increment or decrement the value.

HTH,

Trev.

"Sanka" <sg****@hotmail.com> wrote in message
news:07****************************@phx.gbl...
I want to restrict users entering non numeric characters
in a text box
How can I do this?
If there is any code sample please answer or email I'll be
very glad
Thank you

Jul 21 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
2481
by: vijay21 | last post by:
hi all, Can we restrict the number of characters that the user can input in a javascript prompt? my browser hangs whenever i try to input more than 2048 characters in it. Thanks for any help
2
1332
by: atif | last post by:
I hav a prob with the textfield i want to restrict this field so that only integer values should b entered e.g 0-9 n no english or special characters should b entered in the text field Posted...
2
1701
by: sp | last post by:
Hello Everybody, How can I restrict the user entering non-numeric data in textbox control on server side using asp.net. Any Code sample or suggestions are appreciated. Thanks in advance sp
9
1365
by: Bernie Yaeger | last post by:
I'm trying to control the textbox keypress event to deal with a "." such that it disallows a second "." and no characters after 2 numbers beyond the "." (thus a currency value). I have no problem...
11
4514
by: Keith | last post by:
I apologize for those of you who think I'm posting on the same topic. It is not that I don't appreciate all of your comments - and I'm definitely reading them all - but I think I have a differing...
2
333
by: Sanka | last post by:
I want to restrict users entering non numeric characters in a text box How can I do this? If there is any code sample please answer or email I'll be very glad Thank you
5
13474
by: SKS | last post by:
hi all i would like to know how to restrict user from entering numeric value ina textbox..using C# if user try to enter text it shouldnt be allowed.. i tried errror provider.. but it doesnt met...
8
18170
by: .Net Sports | last post by:
I am checking for text input on a form validation in javascript that required at least one numeric character along with any number of alpha characters for a given input text box. The below is a var...
5
28509
lotus18
by: lotus18 | last post by:
Hello World! I have a sample code here written in vb .net that restricts the textbox to accept only alpha, alphanumeric or numeric characters. Public Enum MyOption Alpha = 1 ...
0
7199
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
7076
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
7274
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
1
6984
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
4670
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
3162
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
1507
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
1
732
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
377
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.