N
Nathan Sokalski
I have become very frustrated with the ListItem control lately due to what
happens when the Text property contains HTML tags. When the Text property
contains HTML tags, or character codes such as , they are converted to
HTML (for example, <br/> would be rendered as <br/>. This can become
very frustrating when you want to bold or underline part or all of a
ListItem, which is not that uncommon of a task. Also, because this would be
extremely trivial to do in an HTML file or classic ASP (and I am guessing
most other server-side technologies), most clients will complain about it.
Is there a reason that the ListItem does this? Why doesn't the ListItem have
a Mode property that can be set to PassThrough, similar to what the Literal
control has. I think this would solve the problem, and still allow the
people that do want their HTML converted to have that option. But since the
Mode property doesn't currently exist (I haven't looked at .NET 3.0, but
since I still use VS2005 and .NET 2.0, that really doesn't matter yet), can
someone tell me a way to use the ListItem and still do a little simple
formatting like bolding and underlining (using simple stuff like the <b></b>
and <u></u> tags) in my code? Thanks.
happens when the Text property contains HTML tags. When the Text property
contains HTML tags, or character codes such as , they are converted to
HTML (for example, <br/> would be rendered as <br/>. This can become
very frustrating when you want to bold or underline part or all of a
ListItem, which is not that uncommon of a task. Also, because this would be
extremely trivial to do in an HTML file or classic ASP (and I am guessing
most other server-side technologies), most clients will complain about it.
Is there a reason that the ListItem does this? Why doesn't the ListItem have
a Mode property that can be set to PassThrough, similar to what the Literal
control has. I think this would solve the problem, and still allow the
people that do want their HTML converted to have that option. But since the
Mode property doesn't currently exist (I haven't looked at .NET 3.0, but
since I still use VS2005 and .NET 2.0, that really doesn't matter yet), can
someone tell me a way to use the ListItem and still do a little simple
formatting like bolding and underlining (using simple stuff like the <b></b>
and <u></u> tags) in my code? Thanks.