Edit: Updated for more clarity.
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 <li>s, would probably kill me - I decided to wrap the <ul> in a literal. This way, I could throw the "text" attribute in a resource file for localization.
However, asp.net thinks that each line break in my code should be replaced with a <br />. 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.
I've temporarily made all <br />s inside of <ul>s display:none in my css, but it feels hackish. I'd rather it not render the <br />s at all.
Code:
<asp:Literal id="literal" runat="server">
<ul>
<li>Item 1</li>
<li>Item 2</li>
...
<li>Item 50</li>
</ul>
</asp:Literal>
What it gives me:
<ul>
<br />
<li>Item 1</li>
<br />
<li>Item 2</li>
<br />
...
<br />
<li>Item 50</li>
<br />
</ul>