If statement to display a div in different place in aspx page
<p>ASP.NET4</p>

<p>This is my aspx page, which has a css file defining #div1, #div2, #div3 styles, and javascript code to have some dynamic change with divs. My question is in a page, there can't be 2 same ids. So div2 can pass here. What's the best way to work around this? Having a div2a, div2b, and in css file - having #div2a, #div2b using same style? And having javascript to select both div2a, div2b? Please advise.</p>

<pre><code>&lt;form id="form1" runat="server"&gt;
    &lt;div&gt;
        &lt;%if (condition) { %&gt;
        &lt;div id="div1"&gt; ... &lt;/div&gt;
        &lt;%} %&gt;
        &lt;%else { %&gt;
        &lt;div id="div2"&gt; ... &lt;/div&gt;
        &lt;%} %&gt;
        ...
        ...

        &lt;%if (condition) { %&gt;
        &lt;div id="div2"&gt; ... &lt;/div&gt;
        &lt;%} %&gt;
        &lt;%else { %&gt;
        &lt;div id="div3"&gt; ... &lt;/div&gt;
        &lt;%} %&gt;
    &lt;/div&gt;
&lt;/form&gt;
</code></pre>
