Haytham
Haytham

Reputation: 854

Can we have Multiple partial views with different models inside a single view?

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 ???

Upvotes: 0

Views: 2626

Answers (1)

Ciro Spaciari
Ciro Spaciari

Reputation: 630

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

Upvotes: 1

Related Questions