Posted 25 October 2007 - 09:54 PM

Hello i new to this site. I am looking for some programing help with this. Also can you show me the aplication example of what it should look like.





Design and develop a program that validates the value a user enters into a TextBox control to ensure that the entry is a valid telephone number. The application should accept a maximum of 12 characters. When the user clicks a button, the program should determine if the entry is of the form 999-999-9999, where the character 9 represents any number.

If the entry is determined to be a telephone number, display an appropriate message, along with the separate substrings that compose the telephone number without the dashes. If the entry is not a telephone number, then display a message as to the reason why the entry is not a valid telephone number, clear the TextBox control and set focus to the TextBox control. Use String class methods to solve the problem.

Here are a few hints to help you code the String methods:

1. Check that the user has entered two dashes in the appropriate spaces.

2. Break the string into 3 substrings, represented as 999,999, and 9999.





Thanks.

