PdfPrep.com

What will you do?

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?
A . Use the CustomValidator control.
B . Replace all TextBox controls that are used for phone number input with MaskedTextBox con trols.
C . Write code that uses a regular expression.
D . Use the RegularExpressionValidator control.

Answer: B

Exit mobile version