GSSP-NET · Question #480
You work as a Windows Application Developer for ABC Inc. The company uses Visual Studio .NET as its application development platform. You are developing an application for the customer support using…
The correct answer is B. Replace all TextBox controls that are used for phone number input with MaskedTextBox con trols. See the full explanation below for the reasoning.
Question
You work as a Windows Application Developer for ABC Inc. The company uses Visual Studio .NET as its application development platform. You are developing an application for the customer support using the .NET Framework. The customer support application accepts phone numbers. While running a report, you notice that the phone numbers displayed do not pursue similar format. Furthermore, there are cases of missing digits and missing area codes. You are required to ensure that the phone numbers are entered in the following format:
(###) ###- #### You need to accomplish this task with the least amount of code. What will you do?
Options
- AUse the CustomValidator control.
- BReplace all TextBox controls that are used for phone number input with MaskedTextBox con trols.
- CWrite code that uses a regular expression.
- DUse the RegularExpressionValidator control.
How the community answered
(29 responses)- A3% (1)
- B76% (22)
- C7% (2)
- D14% (4)
Community Discussion
No community discussion yet for this question.