Q:

Retrieve from html body

From this HTML body of a mail ,How can I retrieve only the body(Hi...Thank You) to a text box
   <html><body><div style="color:#000; background-color:#fff; font-family:HelveticaNeue, Helvetica Neue, Helvetica, Arial, Lucida Grande, Sans-Serif;font-size:14px"><div>Hi...ThankYou</div></div></body></html>

Thank You

A:

I suggest you to have a look at HTML parsing libraries like HtmlAgilityPack or CsQuery
Here is how it's done in CsQuery (the selector syntax is compatible with jquery):
    Dim html = "<html><body><div style=""color:#000; background-color:#fff; font-family:HelveticaNeue, Helvetica Neue, Helvetica, Arial, Lucida Grande, Sans-Serif;font-size:14px""><div>Hi...ThankYou</div></div></body></html>"
    Dim cs = CsQuery.CQ.Create(html)
    Dim txt = cs("body>div>div").Text()

    textBox.Text = txt

you can obtain CsQuery through Nuget using PM> Install-Package CsQuery -Version 1.3.4 command

