Stream Reading code help needed
Hi
I am trying to get data from a website.. by following code
Dim Url As String = "http://www.awebsite.com"
Code:
' Create the request.
Dim PageRequest As HttpWebRequest = _
CType(WebRequest.Create(Url), HttpWebRequest)
' Get the response.
' This takes the most significant amount of time, particularly
' if the file is large, because the whole response is retrieved.
Dim PageResponse As WebResponse = PageRequest.GetResponse()
' Read the response stream.
Dim r As New StreamReader(PageResponse.GetResponseStream())
Dim Page As String = r.ReadToEnd()
r.Close()
what it does is stroe the whole content in a single string
what i want instead of using readtoend() can i use something which will read line by line..
with do loop?
please hlep
Re: Stream Reading code help needed
How about the ReadLine method? At least try looking in intellisense or MSDN or across the forums, before posting a question that has been answered 10 million times...