问题
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?
回答1:
You can use an asp:Literal:
Code behind:
myLiteral.Text = HtmlDecode(GetTextFromDB())
来源:https://stackoverflow.com/questions/4760788/database-text-with-html-formatting-how-to-pull-it-into-my-asp-net-page