For the last time I've been using EWS MAPI to connect to Exchange Server. After this is done I access my mails and firstly display their body (which contains a LOT HTML-tags) in a gridview. After you select a record of that gridview the body is shown in a freetextbox.
我最后一次使用EWS MAPI连接到Exchange Server。完成此操作后,我将访问我的邮件并首先在gridview中显示其正文(包含很多HTML标记)。选择该gridview的记录后,正文将显示在freetextbox中。
My problem is that I want to get rid of the HTML in the body. And configure the freetextbox so that it still displays the the text in his true format.
我的问题是我想摆脱身体中的HTML。并配置freetextbox,使其仍以真实格式显示文本。
Thanks in advance.
提前致谢。
3 个解决方案
#2
1
You can use Html Agility Pack to parse Html and strip out what you want. There are a lot of information on SO about it, for example: How to use HTML Agility pack
您可以使用Html Agility Pack来解析Html并删除您想要的内容。关于它的SO有很多信息,例如:如何使用HTML Agility包
#3
0
Maybe this can help
也许这可以帮助
Convert special chars to HTML entities, without changing tags and parameters
将特殊字符转换为HTML实体,而无需更改标记和参数
#1
#2
1
You can use Html Agility Pack to parse Html and strip out what you want. There are a lot of information on SO about it, for example: How to use HTML Agility pack
您可以使用Html Agility Pack来解析Html并删除您想要的内容。关于它的SO有很多信息,例如:如何使用HTML Agility包
#3
0
Maybe this can help
也许这可以帮助
Convert special chars to HTML entities, without changing tags and parameters
将特殊字符转换为HTML实体,而无需更改标记和参数