What should you recommend?
Correct Answer for the following Question is given below
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?Call the Html.ValidationMessageFor() method for each property in the Customer class.Associate all rendered elements with a validation group.Call the Html.EnableClientValidation() method.Within the view (or a master page), reference the required scripts and call the Html.EnableClientValidation HTML helperMVC 3 changes client validation in several ways. First, it leverages jQuery, jQuery.Validate, and jQuery.Validate.Unobtrusive-Ajax instead of ASP.NETAJAX. Second, you no longer need to manually call Html.EnableClientValidation, because it is enabled by default
Question:
What should you recommend?
Options:
Use ASP.NET validation server controls. Call the Html.EnableClientValidation() method.
Use only strongly typed HTML helpers.
Add DataAnnotations attributes to each property in the Customer class.
Add DataAnnotations attributes to each property in the Customer class.
Correct Answer
The Correct Answer for this Question is
Add DataAnnotations attributes to each property in the Customer class.
Explanation
The Question – What should you recommend? has been answered correctly and answers for the question is Add DataAnnotations attributes to each property in the Customer class.
More about these Exams
These Exam Questions and the order of these questions keep changing. but the answers are obviously same. so if you don’t find a question after another we suggest you search it in the search box and we are sure you’ll find it. you can bookmark this site for Quick access in future.
We hope you found it helpful don’t forget to leave a comment if you feel a need to correct or ask we’re always here to help.
you can find more here at mnccertified
Feel free to contact via comment or email.
Happy Learning
Cheers, Team MNCcertified