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

Total Post:135

Points:947
Posted on    August-26-2014 1:57 AM

 C# C# 
Ratings:


 1 Reply(s)
 539  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

Points:2694
Supported
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