Microsoft
70-519 · Question #171
You are designing an ASP.NET MVC 2 Web application. The Web application must meet the following requirements: - Validate all user input for a class named Customer. - Perform client-side and…
The correct answer is D. Add DataAnnotations attributes to each property in the Customer class. See the full explanation below for the reasoning.
Question
You are designing an ASP.NET MVC 2 Web application. The Web application must meet the following requirements:
- Validate all user input for a class named Customer.
- Perform client-side and server-side validation.
You need to recommend an approach for validating user input. What should you recommend?
Options
- AUse ASP.NET validation server controls.
- BAdd DataAnnotations attributes to each property in the Customer class.
- CUse only strongly typed HTML helpers.
- DAdd DataAnnotations attributes to each property in the Customer class.
How the community answered
(28 responses)- A11% (3)
- B4% (1)
- C7% (2)
- D79% (22)
Community Discussion
No community discussion yet for this question.