Quantcast
Channel: Programming Forums
Viewing all articles
Browse latest Browse all 51036

Reading lines of GetResponseStream

$
0
0
Hey all,

I'm using the following to GET web pages:

Dim request As HttpWebRequest = DirectCast(WebRequest.Create(url), HttpWebRequest)
request.CookieContainer = logincookie
Dim response As HttpWebResponse = DirectCast(request.GetResponse(), HttpWebResponse)
Dim reader As New StreamReader(response.GetResponseStream())
Dim thesource As String = reader.ReadToEnd


I'm trying to extract data from the source. thesource holds the source code of the page successfully, however, I can't loop through each line using a For Each loop, as it merely responds with each character instead of each line.

Can somebody suggest how to fix this?
Thanks guys, Stan.

Viewing all articles
Browse latest Browse all 51036

Trending Articles



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