Press Ctrl / CMD + C to copy this to your clipboard.
This post will be reported to the moderators as potential spam to be looked at
Hi All,
I quite new to umbraco and ran in to a problem. described below,
What im trying to do :,
Render an umbraco macro(asp.net user control) whithin anther macro(cshtml).
i tried
@foreach (var childPage in Model.NodeById(nodeId).Children.Where("Visible && FundID > 0")) { @Html.Raw(umbraco.library.RenderMacroContent("", Model.Id)) }
Its not rendering the user control properly, ie, its like the page_load event of my user control is not working.
http://our.umbraco.org/forum/developers/razor/22305-ASPNET-Usercontrol-inside-Razor-script here @Sebastiaan Janssen has said "Don't forget to surround your razor macro with
runat="server" language="cshtml">@{ HtmlTextWriter writer = new HtmlTextWriter(this.Output); var navigation = new umbraco.presentation.templateControls.Macro(); navigation.Alias = "Navigation"; navigation.MacroAttributes.Add("ulclass", "art-vmenu"); navigation.MacroAttributes.Add("level", 2); navigation.RenderControl(writer); }
I tried this method as well. but no hope. :(
i've found 1 question similar to my situation, here. but no one answered yet.
please help.
Hi,
Try to use this helper
https://github.com/Shandem/Umbraco/blob/master/src/Umbraco.Web/UmbracoHelper.cs
is working on a reply...
Write your reply to:
Upload image
Image will be uploaded when post is submitted
How to render a Macro inside another Macro
Hi All,
I quite new to umbraco and ran in to a problem. described below,
What im trying to do :,
Render an umbraco macro(asp.net user control) whithin anther macro(cshtml).
i tried
Its not rendering the user control properly, ie, its like the page_load event of my user control is not working.
http://our.umbraco.org/forum/developers/razor/22305-ASPNET-Usercontrol-inside-Razor-script here @Sebastiaan Janssen has said "Don't forget to surround your razor macro with
Hi,
Try to use this helper
https://github.com/Shandem/Umbraco/blob/master/src/Umbraco.Web/UmbracoHelper.cs
is working on a reply...