Mert Çakar
Mert Çakar

Reputation: 13

Partial View Model Error (.net Framework)

I have this model in my view:

@model MGDanismanlik.Controllers.SettingsController.WorkCampClas

I call this partial view bottom of the view:

@Html.Partial("MonthlyResultPartial")  

This is the model I use in MonthlyResultPartial:

@model IEnumerable<MGDanismanlik.Controllers.SettingsController.WorkCampaignResultClass>

But when I run it I got this error.

The model item passed into the dictionary is of type 'MGDanismanlik.Controllers.SettingsController+WorkCampClas', but this dictionary requires a model item of type 'System.Collections.Generic.IEnumerable`1[MGDanismanlik.Controllers.SettingsController+WorkCampaignResultClass]'.

What's the problem? I use different model in my partial view. How can I solve this?

Upvotes: 0

Views: 41

Answers (0)

Related Questions