S
Simon
Hi
We have an application that needs to just get the text that you would 'see'
when you open a webpage in Internet Explorer with no code.
Is it possible to strip out the html tags from the result of such code as
below.
Thanks in advance
B
Dim strURL As String
Dim strResult As String
Dim wbrq As HttpWebRequest
Dim wbrs As HttpWebResponse
Dim sr As StreamReader
' Set the URL (and add any querystring values)
strURL = "the page"
' Create the web request
wbrq = WebRequest.Create(strURL)
wbrq.Method = "GET"
' Read the returned data
wbrs = wbrq.GetResponse
sr = New StreamReader(wbrs.GetResponseStream)
strResult = sr.ReadToEnd.Trim
sr.Close()
' Write the returned data out to the page
TextBox1.Text = strResult
We have an application that needs to just get the text that you would 'see'
when you open a webpage in Internet Explorer with no code.
Is it possible to strip out the html tags from the result of such code as
below.
Thanks in advance
B
Dim strURL As String
Dim strResult As String
Dim wbrq As HttpWebRequest
Dim wbrs As HttpWebResponse
Dim sr As StreamReader
' Set the URL (and add any querystring values)
strURL = "the page"
' Create the web request
wbrq = WebRequest.Create(strURL)
wbrq.Method = "GET"
' Read the returned data
wbrs = wbrq.GetResponse
sr = New StreamReader(wbrs.GetResponseStream)
strResult = sr.ReadToEnd.Trim
sr.Close()
' Write the returned data out to the page
TextBox1.Text = strResult