title: .NET usercontrol code-behind not rendering inside XSLT Umbraco macro
body: <p>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:</p>
  
  <pre><code>&lt;xsl:for-each select="$node/* [@isDoc]"&gt;
  //Some markup etc...
    &lt;xsl:value-of select="umbraco.library:RenderMacroContent('&amp;lt;?UMBRACO_MACRO NodeId=&amp;quot;@id&amp;quot; macroAlias=&amp;quot;LogTag&amp;quot;&amp;gt;&amp;lt;/?UMBRACO_MACRO&amp;gt;', @id)" disable-output-escaping="yes"/&gt;
  &lt;/xsl:for-each&gt; 
  </code></pre>
  
  <p>The markup from the usercontrols markup is rendered just fine, but everything in the <code>Page_load</code> is not executed. Why is that? </p>
  
  <p>Heres the usercontrol markup:</p>
  
  <pre><code>&lt;div class="logTag" id="Tag" runat="server"&gt;
        &lt;img src="someimage.png" alt="image"/&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p>And code-behind:</p>
  
  <pre><code>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 + "&lt;br /&gt;");
  }
  </code></pre>
  
  <p>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?</p>