[RESOLVED] Display the body text of a website into a richtextbox
I have a code to get the all html source into a richtextbox but I need display only the body text. Can you help me?
This is the code to get the source:
Code:
Try
Dim request As System.Net.HttpWebRequest = System.Net.HttpWebRequest.Create(TextBoxurlseochecker.Text)
Dim response As System.Net.HttpWebResponse = request.GetResponse()
Dim sr As System.IO.StreamReader = New System.IO.StreamReader(response.GetResponseStream())
Dim sourcecode As String = sr.ReadToEnd()
RichTextBoxseochecker.Text = sourcecode
Catch ex As Exception
End Try
Re: Display the body text of a website into a richtextbox
This is to get the body text through webbroweser control
Code:
Dim bodyText As String = WebBrowser1.Document.Body.InnerText.ToString
RichTextBox1.Text = bodyText
But I want to do this through HttpWebRequest
Re: Display the body text of a website into a richtextbox
if you are pulling in stream
you will see<body> and </body> or</html> in a baddly formatted page
you could just collect that portion
here to talk