数据库文本与HTML格式,如何将其拉入我的asp.net页面 [英] database text with html formatting, how to pull it into my asp.net page
本文介绍了数据库文本与HTML格式,如何将其拉入我的asp.net页面的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我有我想要动态加载的内容,问题是它有一些html格式。我应该将文本拖入哪个控件中,是否有将文本拖入div或标签以及格式的方法?您可以使用asp:Literal:
$ b
解决方案
p>后面的代码:
myLiteral.Text = HtmlDecode(GetTextFromDB())
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?
解决方案
You can use an asp:Literal:
Code behind:
myLiteral.Text = HtmlDecode(GetTextFromDB())
这篇关于数据库文本与HTML格式,如何将其拉入我的asp.net页面的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文