Solved

display html in table cell from c# code behind

Posted on 2011-03-19
3
795 Views
Last Modified: 2012-08-13
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
Comment
Question by:dhenderson12
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
3 Comments
 
LVL 17

Accepted Solution

by:
OriNetworks earned 500 total points
ID: 35172234
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
 

Author Comment

by:dhenderson12
ID: 35172366
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
 

Author Comment

by:dhenderson12
ID: 35172524
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

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article discusses how to create an extensible mechanism for linked drop downs.
Originally, this post was published on Monitis Blog, you can check it here . Websites are getting bigger and more complicated by the day. Video, images and custom fonts are all great for showcasing your product or service. But the price to pay in…
In this tutorial viewers will learn how to embed an audio file in a webpage using HTML5. Ensure your DOCTYPE declaration is set to HTML5: : The declaration should display (CODE) HTML5 is supported by the most recent versions of all major browsers…
HTML5 has deprecated a few of the older ways of showing media as well as offering up a new way to create games and animations. Audio, video, and canvas are just a few of the adjustments made between XHTML and HTML5. As we learned in our last micr…

751 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question