Solved

display html in table cell from c# code behind

Posted on 2011-03-19
3
791 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

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
asp web application 3 39
How to force output to ascii 2 37
Table style position to the left 8 25
ASP.net Moving Visual Studio 2015 project to 2017 2 37
Performance in games development is paramount: every microsecond counts to be able to do everything in less than 33ms (aiming at 16ms). C# foreach statement is one of the worst performance killers, and here I explain why.
Finding original email is quite difficult due to their duplicates. From this article, you will come to know why multiple duplicates of same emails appear and how to delete duplicate emails from Outlook securely and instantly while vital emails remai…
In this tutorial viewers will learn how to position items using CSS's three positioning types Create a new HTML document with an internal stylesheet.: Create another div in CSS and name it Absolute : Type "position:absolute;" and "top:10px; left:50p…
In this Micro Tutorial viewers will learn how to create navigation buttons that change on rollover, using CSS (Continuation of the CSS Image Sprite tutorial) Create a parent ID for all the list items       - Specify position: absolute and display: block…

749 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