Insert HTML at runtime?
<p>I need to write some code that places one of 3 choices of "blocks" of html in a specified place on the page. How can I do this?</p>

<p>I was thinking I can use single value databinding, but I don't think this is the correct way.</p>

<p>I'm using ASP.NET c#.</p>

<p>Edit: here is what it might look like:</p>

<pre><code>MapPlaceholder.InnerHtml = @"&lt;div class="mapContainer smallMap" id="smallGrid" runat="server" visible="false"&gt;
    &lt;div id="node1" class="gridBox" runat="server"&gt;
    &lt;/div&gt;
    &lt;div id="node2" class="gridBox" runat="server"&gt;
    &lt;/div&gt;
    &lt;div id="node3" class="gridBox" runat="server"&gt;
    &lt;/div&gt;
    &lt;div id="node4" class="gridBox" runat="server"&gt;
    &lt;/div&gt;
    &lt;div id="node5" class="gridBox" runat="server"&gt;
    &lt;/div&gt;
    &lt;div id="node6" class="gridBox" runat="server"&gt;
    &lt;/div&gt;
    &lt;div id="node7" class="gridBox" runat="server"&gt;
    &lt;/div&gt;
    &lt;div id="node8" class="gridBox" runat="server"&gt;
    &lt;/div&gt;
    &lt;div id="node9" class="gridBox" runat="server"&gt;
    &lt;/div&gt;
&lt;/div&gt;";
</code></pre>

<p>and in the <code>.aspx</code> page:</p>

<pre><code>&lt;div id="MapPlaceholder" runat="server"&gt;&lt;/div&gt;
</code></pre>

<p>One more thing, how can I tell C# to actually write the <code>"</code> in the string? It isnt working currently because it stop at the first <code>"</code> it finds.</p>

<p>Edit: I have another problem.</p>

<pre><code>                        MapPlaceholder.InnerHtml = block1;
                    HtmlGenericControl smallGrid = (HtmlGenericControl)MapPlaceholder.FindControl("smallGrid");
                    containerName = "smallGrid";
                    smallGrid.Visible = true;
                    smallGrid.Attributes["Style"] = "background-image:url('" + du.getMapBackgroundImage(mapId) + "'); " + "width:300px; height:300px;";
                    containerName = "smallGrid";
</code></pre>

<p>This is what i am trying to do, but the FindControl always returns null. I debugged this and it seems that the html code is being added, but only after the pageload ends. Is there anyway i can tell c# to "render" the div so i can work with it like i need to?</p>
