Morning All,
Another day another Umbraco problem I am having, hopefully somebody could help me, I am currently upgrading a current Umbraco site from v6 to v7.5.5, and changing a lot of my macroscripts to partials. Having particlular trouble with my homepage banner carousel getting an error on the Partial view script not loading, here is the partial view for the homepage, I've embedded within the homepage template via a Macro with a content picker with alias nodeId which dynamically pulls in an image from a separate folder
Also this is the full error message within the log files:
Error loading Partial View (file: ~/Views/MacroPartials/HeroBanner.cshtml). Exception: System.Collections.Generic.KeyNotFoundException: The given key was not present in the dictionary.
at System.Collections.Generic.Dictionary`2.getItem(TKey key)
at ASP.PageViewsMacroPartialsHeroBannercshtml.Execute()
Error loading Partial View script
Morning All, Another day another Umbraco problem I am having, hopefully somebody could help me, I am currently upgrading a current Umbraco site from v6 to v7.5.5, and changing a lot of my macroscripts to partials. Having particlular trouble with my homepage banner carousel getting an error on the Partial view script not loading, here is the partial view for the homepage, I've embedded within the homepage template via a Macro with a content picker with alias nodeId which dynamically pulls in an image from a separate folder
Here is the partial view script:
Also this is the full error message within the log files:
Any help would be much appreciated.
Kind regards
Nick
Have you tried ContainsKey on your first
if
confition?Eg
Many thanks Stefano, that did the trick, have a great day.
Cheers
is working on a reply...