How to get HTML of HtmlControl object in backend
<p>I have a short snippet of C# code like this:</p>

<pre><code>HtmlGenericControl titleH3 = new HtmlGenericControl("h3");
titleH3.Attributes.Add("class", "accordion");

HtmlAnchor titleAnchor = new HtmlAnchor();
titleAnchor.HRef = "#";
titleAnchor.InnerText = "Foo Bar";
titleH3.Controls.Add(titleAnchor);
</code></pre>

<p>What I want is a way to return a string that looks like this:</p>

<pre><code>&lt;h3 class="accordion"&gt;&lt;a href="#"&gt;Foo Bar&lt;/a&gt;&lt;/h3&gt;
</code></pre>

<p>Any thoughts or suggestions?</p>
