Using LoadControl on pages with server controls
<p>I'm trying to create a user control template that I can send as email.</p>

<p>In a utility class I have a method that contains this code:</p>

<pre><code>StringBuilder sb = new StringBuilder();
Page p = new Page();
UserControl ctrl = (UserControl)p.LoadControl("~/EmailTemplates/OrderConfirmation.ascx");
StringWriter sw = new StringWriter(sb);
Html32TextWriter htw = new Html32TextWriter(sw);

ctrl.RenderControl(htw);
</code></pre>

<p>This correctly writes the user controls text, but if I want to use a server control such as a listview inside of the controls page, the listview is never evaluated. It seems that only inline code blocks are evaluated. How can I get around this?</p>
