Solved

display html in table cell from c# code behind

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

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

Suggested Solutions

Building a website can seem like a daunting task to the uninitiated but it really only requires knowledge of two basic languages: HTML and CSS.
This article discusses four methods for overlaying images in a container on a web page
In this tutorial viewers will learn how to style transparent/translucent elements using alpha transparency in CSS Start with a normal styled element, such as a div.: Define its "background-color" property as "rgba (255, 255, 255, .5): The numbers in…
In this tutorial viewers will learn how to style elements, such a divs, with a "drop shadow" effect using the CSS box-shadow property Start with a normal styled element, such as a div.: In the element's style, type the box shadow property: "box-shad…

746 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

18 Experts available now in Live!

Get 1:1 Help Now