Error Loading Razor Script (file: Top Image2) 'umbraco.MacroEngines.DynamicNode' does not contain a definition for '_websitePicker' at CallSite.Target(Closure , CallSite , Object , Int32 )
at System.Dynamic.UpdateDelegates.UpdateAndExecute2[T0,T1,TRet](CallSite site, T0 arg0, T1 arg1)
at ASP._Page_macroScripts_TopImage2_cshtml.Execute() in \\TopImage2.cshtml:line 4
at System.Web.WebPages.WebPageBase.ExecutePageHierarchy()
at System.Web.WebPages.WebPage.ExecutePageHierarchy()
at System.Web.WebPages.WebPageBase.ExecutePageHierarchy(WebPageContext pageContext, TextWriter writer, WebPageRenderingBase startPage)
at umbraco.MacroEngines.RazorMacroEngine.ExecuteRazor(MacroModel macro, INode currentPage)
at umbraco.MacroEngines.RazorMacroEngine.Execute(MacroModel macro, INode currentPage)
What is wrong with this Razor Script?
I am try to use the following razor script and it does not work with the following error.
The error is:
Error Loading Razor Script (file: Top Image2) 'umbraco.MacroEngines.DynamicNode' does not contain a definition for '_websitePicker' at CallSite.Target(Closure , CallSite , Object , Int32 )
at System.Dynamic.UpdateDelegates.UpdateAndExecute2[T0,T1,TRet](CallSite site, T0 arg0, T1 arg1)
at ASP._Page_macroScripts_TopImage2_cshtml.Execute() in \\TopImage2.cshtml:line 4
at System.Web.WebPages.WebPageBase.ExecutePageHierarchy()
at System.Web.WebPages.WebPage.ExecutePageHierarchy()
at System.Web.WebPages.WebPageBase.ExecutePageHierarchy(WebPageContext pageContext, TextWriter writer, WebPageRenderingBase startPage)
at umbraco.MacroEngines.RazorMacroEngine.ExecuteRazor(MacroModel macro, INode currentPage)
at umbraco.MacroEngines.RazorMacroEngine.Execute(MacroModel macro, INode currentPage)
Many thanks
TT
Looks like you're accidentally making an assignment to Model._websitePicker instead of checking for equality. It should be:
Many thanks Douglas that was it.
is working on a reply...