Click here to Skip to main content
15,899,634 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I have one Parent view and one is Swithcondition artical view and one on anoter partial view


Could you please help me how to display data in child partial view
Main view
@using CMS.Mvc.Models.MeetOurExpertsPage

@for(var Item in Model.GenericList)
{
// Here the model data is displaying perfec@model Item
@Htmlrenderpartial("ArticalList",Item)
}

Swithcase view
swtch(Item)
{
case:
@Htmlrenderpartial("ChildPartial",Item)

}
while passing the model data from main view to switch partial view that is displaying the below message
System.InvalidOperationException: The model item passed into the dictionary is of type 'CMS.Mvc.Models.MeetOurExpertsPage', but this dictionary requires a model item of type 'CMS.Mvc.Models.ListItems'.


child partial view is

displaying data from this @using CMS.Mvc.Models.MeetOurExpertsPage
Posted

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900