exam questions

Exam 70-486 All Questions

View all questions & answers for the 70-486 exam

Exam 70-486 topic 1 question 63 discussion

Actual exam question from Microsoft's 70-486
Question #: 63
Topic #: 1
[All 70-486 Questions]

You need to enable client-side validation for an ASP.NET MVC application.
Which three actions should you perform? Each correct answer presents part of the solution.

  • A. Attach a custom validation attribute to the model properties that the view uses.
  • B. Reference the jquery, jquery.validate and jquery.validate.unobtrusive script files in the view.
  • C. Open the web.config file at the project root, and set the values of the ClientValidationEnabled and UnobtrusiveJavaScriptEnabled keys to True.
  • D. For each form element, use the Validator.element() method to validate each item.
  • E. Add data annotations to the model properties that the view uses.
Show Suggested Answer Hide Answer
Suggested Answer: BCE 🗳️
B: The validation can be implemented using jQuery and jQuery validation plug-in (jquery.validate.min.js and jquery.validate.unobtrusive.min.js).
C: When you are developing an MVC application in Visual Studio 2012 then the client-side becomes enabled by default, but you can easily enable or disable the writing of the following app setting code snippet in the web.config file.
<configuration>
<appSettings>
<add key="ClientValidationEnabled" value="true" />
<add key="UnobtrusiveJavaScriptEnabled" value="true" />
</appSettings>
</configuration>
E: The jQuery validation plug-in takes advantage of the Data Annotation attributes defined in the model, which means that you need to do very little to start using it.
Reference: ASP.NET MVC Client Side Validation
http://www.codeproject.com/Articles/718004/ASP-NET-MVC-Client-Side-Validation

Comments

Chosen Answer:
This is a voting comment (?). It is better to Upvote an existing comment if you don't have anything to add.
Switch to a voting comment New
markcowell
4 years, 8 months ago
BCE is correct
upvoted 1 times
...
Community vote distribution
A (35%)
C (25%)
B (20%)
Other
Most Voted
A voting comment increases the vote count for the chosen answer by one.

Upvoting a comment with a selected answer will also increase the vote count towards that answer by one. So if you see a comment that you already agree with, you can upvote it instead of posting a new comment.

SaveCancel
Loading ...