Quantcast
Channel: VBForums
Viewing all articles
Browse latest Browse all 42506

VS 2010 Converting String to HTML Document

$
0
0
Hi,

I have a function called SendRequest that takes a URL and handles the sending of the webrequest, and the receipt of the webresponse. Code follows:

Code:

Private Function SendRequest(ByVal http_url as string) as string
Dim l_response as Net.WebResponse, l_webrequest as Net.WebRequest, l_datastream as System.IO.Stream, retstr as string

Try
l_webrequest = Net.WebRequest.Create(http_url)
l_response = l_webrequest.GetResponse
l_datastream = l_response.GetResponseStream
Dim l_datareader as New System.IO.StreamReader(l_datastream)
retstr = l_datareader.ReadToEnd
l_response.close
Catch Ex as Net.WebException
' Some error handling
End Try

End Function

The problem is that I have to manually extract the components from the returned string "retstr". Is there a way to convert this string into a HTML document?

Any help would be appreciated.
Thanks,
N

Viewing all articles
Browse latest Browse all 42506

Latest Images

Trending Articles



Latest Images

<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>