Scrape web page, read results 1 line at a time

I have the code below that scrapes a web page, and put the entire page into "SourceCode".  
I want to loop through "SourceCode" 1 line at a time.
Everything I have tried loops through it 1 character at a time.


Dim SourceRequest As Net.HttpWebRequest = Net.HttpWebRequest.Create("http://www.handlerassociates.com")
        Dim SourceResponse As Net.HttpWebResponse = SourceRequest.GetResponse()
        Dim SourceStream As New IO.StreamReader(SourceResponse.GetResponseStream)
        Dim SourceCode As String = String.Empty
        While SourceStream.EndOfStream = False
            SourceCode &= vbNewLine & SourceStream.ReadLine
        End While
        SourceCode = SourceCode.Trim(vbNewLine)
rrhandle8Asked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

UnifiedISCommented:
Please try switching your while statement to this:
While SourceStream.Peek > 0 --instead of .EndOfStream = False

Not sure if that is it but that is how I consume streamreaders
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
rrhandle8Author Commented:
"While SourceStream.EndOfStream = False" works fine.  I am sure your solution would also work.
I did not explain the question clearly enough.  Let me try again.

After all the HTML has been captured in SourceCode, how do I read through SourceCode one line at a time?  When I try to do it, I get 1 character at a time.
0
rrhandle8Author Commented:
Didn't work and no one else offered a solution.
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Microsoft Development

From novice to tech pro — start learning today.