473,396 Members | 2,013 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

Numbers or letters in a TextBox

How I can have a TextBox that to only lets me enter
letters or numbers?

Nov 17 '05 #1
2 1154
"Pablo" <pd******@bco.pichincha.com> wrote in news:072f01c36be3$55b6fdf0
$a*******@phx.gbl:
How I can have a TextBox that to only lets me enter
letters or numbers?

You'll need to use Client side javascript.

Or, you can put a custom validator on the server side and check the input.

--
Lucas Tam (RE********@rogers.com)
Please delete "REMOVE" from the e-mail address when replying.
http://members.ebay.com/aboutme/coolspot18/
Nov 17 '05 #2
You should always have a server side validator, just in case some of your
users don't support JavaScript (or they turned it off). And remember,
postbacks do not have to come from your page, it's so simple to fake a form
submission with made up values. The moral is never trust anything that comes
from the client, no matter how much validating JavaScript you have there.

Jerry

"Lucas Tam" <RE********@rogers.com> wrote in message
news:Xn**************************@140.99.99.130...
"Pablo" <pd******@bco.pichincha.com> wrote in news:072f01c36be3$55b6fdf0
$a*******@phx.gbl:
How I can have a TextBox that to only lets me enter
letters or numbers?

You'll need to use Client side javascript.

Or, you can put a custom validator on the server side and check the input.

--
Lucas Tam (RE********@rogers.com)
Please delete "REMOVE" from the e-mail address when replying.
http://members.ebay.com/aboutme/coolspot18/

Nov 17 '05 #3

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

Similar topics

1
by: Jon Gunnar Rue | last post by:
I have a textbox accepting both numbers and letters. Is there a way to convert this over to a hex string so I may use it in another textbox ? --- Jon Gunnar Rue ICQ: 15839694 MSN:...
7
by: Gerard Flanagan | last post by:
All would anyone happen to have code to generate Cutter Numbers: eg. http://www1.kfupm.edu.sa/library/cod-web/Cutter-numbers.htm or is anyone looking for something to do?-) (I'm under...
9
by: Paul | last post by:
Hi, I have spent the last couple of days researching this issue. And I have also spent time thinking about what is needed. I am distributing my software as shareware. When a customer orders a...
8
by: flyingisfun1217 | last post by:
Hey, Sorry to bother everybody again, but this group seems to have quite a few knowledgeable people perusing it. Here's my most recent problem: For a small project I am doing, I need to...
1
by: Jeff | last post by:
hey gang. I have a code to create a random string of letters. The number of them can be whatever I desire. what i would like to do, is have it both letters and integers. how would i modify...
5
by: lim4801 | last post by:
I am currently in doing a program which is given by my tutor: Contemplate that you are working for the phone company and want to sell "special" phone numbers to companies. These phone numbers are...
5
by: yoshimishu | last post by:
i have to create two text boxes. If i fill in first text box the second textbox shoud automatically display the number of letters displayed in first text box. If the number of letters in first text...
3
by: sasimca007 | last post by:
Hello friends, We have seen many textboxes, it is used as date,readonly,text etc... If we want to restrict the textbox with not to enter letters only numbers and one more...
2
by: danon | last post by:
Hi to you all I am a new to programming and i am looking to build a programme for my own garage. can any one help me please. 1 Can any one tell how i can programme a textbox to accept only...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
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
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
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

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.