Home > DeveloperSection > Forums > database text with html formatting, how to pull it into my asp.net page
Chintoo Semi

Total Post:135

Posted on    August-26-2014 1:57 AM

 C# C# 

 1 Reply(s)
 546  View(s)
Rate this:

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?

Sumit Kesarwani

Total Post:378

Posted on    August-26-2014 2:48 AM

Hi Chintoo, 

You can use an asp:Literal:

Code behind:

myLiteral.Text = HtmlDecode(GetTextFromDB())

Don't want to miss updates? Please click the below button!

Follow MindStick