nerdexam
Microsoft

70-519 · Question #176

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…

The correct answer is D. Use jQuery to access server-side validation code. See the full explanation below for the reasoning.

Question

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?

Options

  • AUse the Required attribute to annotate the user name property of the model.
  • BUse an UpdatePanel control to access server-side validation.
  • CImplement the IValidator interface on the model.
  • DUse jQuery to access server-side validation code.

How the community answered

(44 responses)
  • A
    5% (2)
  • B
    11% (5)
  • C
    2% (1)
  • D
    82% (36)

Community Discussion

No community discussion yet for this question.

Full 70-519 Practice