Microsoft
70-519 · Question #113
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 A. 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 jQuery to access server-side validation code.
- BUse the Required attribute to annotate the user name property of the model.
- CUse an UpdatePanel control to access server-side validation.
- DImplement the IValidator interface on the model.
How the community answered
(21 responses)- A86% (18)
- B10% (2)
- D5% (1)
Community Discussion
No community discussion yet for this question.