Go Premium for a chance to win a PS4. Enter to Win

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 813
  • Last Modified:

display html in table cell from c# code behind

I created a web project in vs 2008 with c#.

I am displaying text from an xml file in a table cell.  That works perfectly.

The problem I'm having is that the text has some embedded html chars, like <b> and <p> that are displaying as literals.  I have tried encoding them as html, but that only turns them in the escape sequences and displays THOSE as literals.  

How can I get the text to display as html?
0
dhenderson12
Asked:
dhenderson12
  • 2
1 Solution
 
OriNetworksCommented:
How are you writing them to the page? If I remember correctly, I use to just use the label control to write the html to the page.
0
 
dhenderson12Author Commented:
I'm just writing to the table cell (inner html).  I tried a text box control, but that didn't help.  I will try the label control.

BTW, the <p> is already escaped in the xml.
0
 
dhenderson12Author Commented:
ok, I'm dumb.  I was saving the node.toString() rather then the node.Value.  Now all works fine.  You get the points for answering.  thanks.
0

Featured Post

Ask an Anonymous Question!

Don't feel intimidated by what you don't know. Ask your question anonymously. It's easy! Learn more and upgrade.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now