I have a _Layout.cshtml in mvc4 web application, in this master view i am calling a partial view for menu which is strongly type , now I have created a new strongly typed partial view for service menu link I have wrote the code to get data from database , But now when i click on the service menu link i am getting the below error message
"
"
The model item passed into the dictionary is of type 'System.Collections.Generic.List`1[BusinessApplicationTemplate.Models.Service]', but this dictionary requires a model item of type 'System.Collections.Generic.IEnumerable`1[BusinessApplicationTemplate.Models.slider]'.
why it is so
Mark TaborPosted Sep 12, 2016, 2:30 AM
Bikesh Srivastava
it is not that issue i am already using IEnumerableBikesh SrivastavaPosted Sep 12, 2016, 2:21 AM
Mark TaborPosted Sep 12, 2016, 12:39 AM
The model item passed into the dictionary is of type 'System.Collections.Generic.List`1[BusinessApplicationTemplate.Models.slider]', but this dictionary requires a model item of type 'System.Collections.Generic.IEnumerable`1[BusinessApplicationTemplate.Models.Service]'.
and when i reference the service model then it saysThe model item passed into the dictionary is of type 'System.Collections.Generic.List`1[BusinessApplicationTemplate.Models.service]', but this dictionary requires a model item of type 'System.Collections.Generic.IEnumerable`1[BusinessApplicationTemplate.Models.slider]'.
}
Midhun TpPosted Sep 11, 2016, 10:27 PM