The issue is to do with casting the pillar object to the type that the partial view is expecting. (Depending on your understanding of C# that will either sound fine, or a bit confusing.)
Either way, in your "ncHeroShadowBox.cshtml" partial-view file, it should start with the line...
@inherits UmbracoViewPage<...>
The bit in the angle brackets is the object-type for that this partial-view expects to use as it's @Model. Looking at your error, it appears to start with IEnumerable<...>.
Partial inside a foreach
On my docType I have a nestedcontent. The type of that nested content is NcHeroShadowBox.
I'm getting this error on the code above:
Hi bh,
The issue is to do with casting the
pillar
object to the type that the partial view is expecting. (Depending on your understanding of C# that will either sound fine, or a bit confusing.)Either way, in your "ncHeroShadowBox.cshtml" partial-view file, it should start with the line...
The bit in the angle brackets is the object-type for that this partial-view expects to use as it's
@Model
. Looking at your error, it appears to start withIEnumerable<...>
.If you swap that to be...
...then hopefully that should solve it.
Cheers,
- Lee
is working on a reply...
This forum is in read-only mode while we transition to the new forum.
You can continue this topic on the new forum by tapping the "Continue discussion" link below.