473,395 Members | 1,863 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,395 software developers and data experts.

Please!! Help!! (textbox that accept Only Phone Number!)

hello guys.. please help me i made a program for my thesis and i need a
textbox which will only accept telephone number like this format
(954)-854-2452 .. please... please help me guys i really dont know what the code is.. thank you thank you in advance..
Mar 14 '08 #1
3 1597
lee123
556 512MB
hi there i believe there in the propeties for the text box there is a property called data format in there you can choose a setting for you phone number and format it the way you'll like to see it if you choose custom.

lee123
Mar 14 '08 #2
pureenhanoi
175 100+
hello guys.. please help me i made a program for my thesis and i need a
textbox which will only accept telephone number like this format
(954)-854-2452 .. please... please help me guys i really dont know what the code is.. thank you thank you in advance..
Use masked textbox instead of origine textbox
Mar 15 '08 #3
janders468
112 Expert 100+
If you are looking to validate this in code, then you could use something like this:

Expand|Select|Wrap|Line Numbers
  1. If (TextBox Value) like "(###)-###-####" then
  2.     'accept result
  3. else
  4.     'do something else
  5. end if
  6.  
The "#" insure that a number is entered and the rest verifies the format.
Mar 15 '08 #4

Sign in to post your reply or Sign up for a free account.

Similar topics

0
by: Gernot Saborowski | last post by:
To all IIS/ASP-professionals, we just upgraded from one machine to another and are experiencing some strange date time number problems. Both systems have been set up like this: - MS Windows...
3
by: Hai Nguyen | last post by:
Hi All I have a textbox want to mask as phone box. How can I do it? Thanks
4
by: JC | last post by:
Hello- I have a form which has a listbox, a textbox and a submit button. The user types a phone number into the textbox, clicks button, text gets added to the listbox. After this process I need...
2
by: I am Sam | last post by:
Ok I set up a button column to delete an individual record. Nothing happens when I test it. Someone please help understand why. Below is the associated coding: DataGrid control: ...
1
by: womblesjc | last post by:
I have a data bound Details View control in asp.net 2.0 that formats a phone number. The 'Default Mode' for the control is set to Edit. The phone number field is a template field and I can...
3
by: venu | last post by:
Hi, I have a different requirement and it is : I need to validate a phone number field. It may or may not be a US phone number. The constraints are : *********************** # It should...
2
by: cpptutor2000 | last post by:
Could some PHP guru please help me? I have very standard PHP - MySQL application that reads in some data from a table and for each row, puts a check box at the start of the row. Now the check boxes...
10
by: gopishk | last post by:
I have a text box and it can contain only numbers. Similar to a phone number text box while adding a new contact. Programatically how can we open only the numeric keypad instead of both text/numeric...
4
by: luke noob | last post by:
This is my HTML... <head> <script type="text/javascript" src="js/jquery-1.2.6.pack.js"></script> <script type="text/javascript" src="js/script.js"></script> </head> <body>
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
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...
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:
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
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,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
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...

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.