Hi everyone am developing an application using ASP.NET MVC 5 and I want to display different models using partial views inside a single view is that possible or I have to make a model for the parent view that includes all the models of the partials ???
Asked
Active
Viewed 2,227 times
0
-
Possible duplicate of [Multiple models in a view](https://stackoverflow.com/questions/4764011/multiple-models-in-a-view) – Dec 15 '17 at 23:56
1 Answers
1
If i understood you want use more than one model per view and this is not possible. You need a object with others objects inside. (like you said a model to the parent view that includes all models of the partials).
Your post maybe duplicated for this: MVC 5 Multiple Models in a Single View

Ciro Spaciari
- 630
- 5
- 10
-
-
1If you want you can use a dynamic object as model but i prefer a ViewModel like solution. saddly we cant use more than one model per view in razor. – Ciro Spaciari Dec 15 '17 at 23:24
-