Solved

display html in table cell from c# code behind

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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
.php tree directory? 5 55
Download a website to hdd 2 49
Exit the loop 4 34
IIS Authorization for Web Service 2 21
This article demonstrates how to create a simple responsive confirmation dialog with Ok and Cancel buttons using HTML, CSS, jQuery and Promises
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 code links for mobile sites that, once clicked, send a call or text to a specified number. For a telephone link (once clicked, calls a number), begin with a normal "<a href=" link tag. For the href, specify…
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…

914 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

Need Help in Real-Time?

Connect with top rated Experts

19 Experts available now in Live!

Get 1:1 Help Now