PrepAway - Latest Free Exam Questions & Answers

What should you recommend?

You are designing an ASP.NET MVC 2 Web application that requires each user to register
a user name and password before accessing restricted content. You have the following
requirements for user registration: • When the focus leaves the user name input field,

validate that the user name does not already exist. • Display validation results before
submitting the form. You need to recommend a data validation strategy. What should you
recommend?

PrepAway - Latest Free Exam Questions & Answers

A.
Use the Required attribute to annotate the user name property of the model. Call the
Html.EnableClientValidation() method from the view.

B.
Use an UpdatePanel control to access server-side validation.

C.
Use jQuery to access server-side validation code.

D.
Implement the IValidator interface on the model.


Leave a Reply