[英]HTML parsing - Asp.net
I got HTML tags saved in column as : 我将HTML标签保存在列中为:
<p><strong>Alva Beach Markets from 8.00am to 1.00pm.  <p> <strong>阿尔瓦海滩市场从8:00 am到1.00pm。&#160; For more information contact Monika Chapple on 0428 649 472.</strong></p>
有关更多信息,请致电0428 649 472与Monika Chapple联系。</ strong> </ p>
But when bind it to Label out is showing whole HTML tags instead the inner text. 但是,将其绑定到Label out时,将显示整个HTML标签,而不是内部文本。
How should i parse this before binding to label control. 在绑定到标签控件之前,我应该如何解析它。
Thanks 谢谢
Use the literal control not a label. 使用文字控件而不是标签。 The label control ignores markup and spits out exactly what it is given as text.
标签控件将忽略标记,并准确地显示其作为文本给出的内容。 The literal will return the HTML.
文字将返回HTML。
Weird, someone had replied with 'use a literal control', but their post is gone now. 很奇怪,有人回答“使用文字控件”,但现在他们的帖子不见了。 Anyway, what's what you should do.
无论如何,你应该做什么。
-- Edit: -编辑:
And now it's back again. 现在又回来了。 Disregard me.
别理我
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.