MyHeadHurts
MyHeadHurts

Reputation: 1562

database text with html formatting, how to pull it into my asp.net page

I have content that I want to load dynamically, the problem is it has some html formatting in it. What control should i pull the text into, is there a way to pull the text into a div or a label, along with the formatting?

Upvotes: 0

Views: 792

Answers (1)

Karel
Karel

Reputation: 2212

You can use an asp:Literal:

Code behind:

myLiteral.Text = HtmlDecode(GetTextFromDB())

Upvotes: 4

Related Questions