how to stop < and > from being rendered into &lt and &gt in a listitem (bulletedlist)

T

Tony

I want to display the text of items in a bulletedlist on multiple lines, but
I can't get it working. Here is a sample version of my code below:

protected void blStaff_DataBound(object sender, EventArgs e)
{
foreach (ListItem lstItem in ((BulletedList)sender).Items)
{
lstItem.Text = "A" + "<br>" + "B";
}
}

Instead of placing "<br"> between "A" and "B", when the page renders, the
<br> becomes &ltbr&gt. I tried Environment.Newline(), '\n', the character
60 (<), nothing worked Help is greatly appreciated, thanks.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,989
Messages
2,570,207
Members
46,782
Latest member
ThomasGex

Latest Threads

Top