Microsoft
70-519 · Question #78
You are designing an ASP.NET MVC 2 Web application. You have the following requirements: - Type safety must be validated at compile time. - Code must not require explicit run-time type casting. You…
The correct answer is C. Use strongly typed view model classes. See the full explanation below for the reasoning.
Question
You are designing an ASP.NET MVC 2 Web application. You have the following requirements:
- Type safety must be validated at compile time.
- Code must not require explicit run-time type casting.
You need to pass data between the controllers and the views within the Web application. Which approach should you recommend?
Options
- AUse the ViewDataDictionary class.
- BUse the TempDataDictionary class.
- CUse strongly typed view model classes.
- DUse dynamic object view model classes.
How the community answered
(60 responses)- A10% (6)
- B5% (3)
- C83% (50)
- D2% (1)
Community Discussion
No community discussion yet for this question.