RenderMacroContent not rendering UserControl macros
Hey folks. I have a razor macro (RenderFullBlockContent.cshtml) that draws a standard layout for our site. Within this macro I have the following call to render any sub content (including macros)
This macro iterates through a nodes children and renders a property called blockContent on the page. In the past it has only rendered razor macros but we have recently started to move towards .Net UserControls.
I attempted to create a UserControl macro and insert it into the property blockContent (rich text editor) but when I go to view the page I get the following error message:
RenderFullBlockContent.cshtml seems to be having an issue rendering the UserControl macro that I've put on the page. Am I incorrect in assuming that RenderMacroContent can render UserControls? I figured I would be able to put a UserControl in the content and it would be no problem. Thanks in advance.
RenderMacroContent not rendering UserControl macros
Hey folks. I have a razor macro (RenderFullBlockContent.cshtml) that draws a standard layout for our site. Within this macro I have the following call to render any sub content (including macros)
This macro iterates through a nodes children and renders a property called blockContent on the page. In the past it has only rendered razor macros but we have recently started to move towards .Net UserControls.
I attempted to create a UserControl macro and insert it into the property blockContent (rich text editor) but when I go to view the page I get the following error message:
RenderFullBlockContent.cshtml seems to be having an issue rendering the UserControl macro that I've put on the page. Am I incorrect in assuming that RenderMacroContent can render UserControls? I figured I would be able to put a UserControl in the content and it would be no problem. Thanks in advance.
There is quite a long discussion about rending user controls inside razor on this thread, which may help
http://our.umbraco.org/forum/developers/razor/22305-ASPNET-Usercontrol-inside-Razor-script
is working on a reply...