I have a XSLT macro that renders some markup and .NET usercontrol macros in a loop. So thats multiple usercontrol macros inside a xslt macro:
<xsl:for-each select="$node/* [@isDoc]">
//Some markup etc...
<xsl:value-of select="umbraco.library:RenderMacroContent('<?UMBRACO_MACRO NodeId="@id" macroAlias="LogTag"></?UMBRACO_MACRO>', @id)" disable-output-escaping="yes"/>
</xsl:for-each>
The markup from the usercontrols markup is rendered just fine, but everything in the Page_load
is not executed. Why is that?
Heres the usercontrol markup:
<div class="logTag" id="Tag" runat="server">
<img src="someimage.png" alt="image"/>
</div>
And code-behind:
public int NodeId { get; set; }
protected void Page_Load(object sender, EventArgs e)
{
if (IsPostBack)return;
var tools = new Tools();
var userId = (Int32)Membership.GetUser().ProviderUserKey;
Tag.Visible = tools.GetLog(NodeId, userId);
Response.Write("Node=" + NodeId + " - User=" + userId + "<br />");
}
Neither the Response.Write or Tag.Visible is working. I've tried testing the usercontrol macro directly on a blank - works fine! Is this not possible, or am I doing something wrong?