Click here to Skip to main content
Rate this: bad
good
Please Sign up or sign in to vote.
See more: C# ASP:NET
Hi, as the question states, im stuck on trying to make my text box's numeric I got 5 text box's that should only allow numbers no letters please help
 
Wes
Posted 10-Oct-12 3:30am
Wes101392
Comments
aspnet_regiis -i at 10-Oct-12 8:52am
   
Have you heard of numeric validator in asp.net ?
Wes101 at 10-Oct-12 8:54am
   
No I've only been coding in asp for 6 weeks
Milind Thakkar at 10-Oct-12 8:57am
   
Or you can use regular expression on Key Press event
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 2

There are ways to make this happen, using regular expression, JavaScript validation, etc.
 
I would prefer Masked Textbox for it: Enhanced Textbox Control[^]
  Permalink  
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 1

here is an example:
 
Text box to accept only number[^]
  Permalink  

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

  Print Answers RSS
0 Mika Wendelius 161
1 Abhinav S 115
2 Peter Leow 110
3 Suvendu Shekhar Giri 100
4 Dave Kreskowiak 85
0 Sergey Alexandrovich Kryukov 8,513
1 OriginalGriff 6,526
2 Peter Leow 3,657
3 Zoltán Zörgő 3,426
4 Richard MacCutchan 2,417


Advertise | Privacy | Mobile
Web04 | 2.8.150123.1 | Last Updated 10 Oct 2012
Copyright © CodeProject, 1999-2015
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100