问题
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.
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.
Thanks in advance.
回答1:
You can use regular expressions.
have a look at: here
回答2:
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
回答3:
Maybe this can help
Convert special chars to HTML entities, without changing tags and parameters
来源:https://stackoverflow.com/questions/5229700/how-to-get-rid-of-html-tags-in-a-message