HTML in ASP:Literal headache: it tries to help too much
<p>Edit: Updated for more clarity.</p>

<p>I have a an unordered list of items, that I need to localize. Rather than wrapping the text of each list item - which, over the course of hundreds of &lt;li&gt;s, would probably kill me - I decided to wrap the &lt;ul&gt; in a literal. This way, I could throw the "text" attribute in a resource file for localization.</p>

<p>However, asp.net thinks that each line break in my code should be replaced with a &lt;br /&gt;. Is there a property or a way around this that I'm just brainfarting on, besides replacing each \n in the text with nothing? I tried Mode="PassThrough" and that didn't seem to make a difference.</p>

<p>I've temporarily made all &lt;br /&gt;s inside of &lt;ul&gt;s display:none in my css, but it feels hackish. I'd rather it not render the &lt;br /&gt;s at all.</p>

<p>Code:</p>

<pre><code>&lt;asp:Literal id="literal" runat="server"&gt;
    &lt;ul&gt;
        &lt;li&gt;Item 1&lt;/li&gt;
        &lt;li&gt;Item 2&lt;/li&gt;
        ...
        &lt;li&gt;Item 50&lt;/li&gt;
    &lt;/ul&gt;
&lt;/asp:Literal&gt;
</code></pre>

<p>What it gives me:</p>

<pre><code>&lt;ul&gt;
&lt;br /&gt;
    &lt;li&gt;Item 1&lt;/li&gt;
    &lt;br /&gt;
    &lt;li&gt;Item 2&lt;/li&gt;
    &lt;br /&gt;
    ...
    &lt;br /&gt;
    &lt;li&gt;Item 50&lt;/li&gt;
    &lt;br /&gt;
&lt;/ul&gt;
</code></pre>
