Developing ASP.NET MVC Web Applications — Question 49
You are designing an ASP.NET Core MVC application.
You need to combine two existing models to create a view.
Which MVC component should you use?
Answer options
- A. ViewComponent
- B. View
- C. Controller
- D. Model
Correct answer: B
Explanation
The correct answer is B, as a View is responsible for displaying the combined data from models. While ViewComponents and Controllers have their roles, they do not directly create the output for the user interface as a View does, and the Model represents the data itself rather than the presentation.