PrepAway - Latest Free Exam Questions & Answers

What should you recommend?

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?

PrepAway - Latest Free Exam Questions & Answers

A.
Add DataAnnotations attributes to each property in the Customer class. Associate all
rendered elements with a validation group.

B.
Use only strongly typed HTML helpers. Call the Html.ValidationMessageFor() method for
each property in the Customer class.

C.
Use ASP.NET validation server controls. Call the Html.EnableClientValidation() method.

D.
Add DataAnnotations attributes to each property in the Customer class. Call the
Html.EnableClientValidation() method.


Leave a Reply