I need to read a WEb page and put each line into an Array in Vb .net
any help is well appreciated.
Thanks
Printable View
I need to read a WEb page and put each line into an Array in Vb .net
any help is well appreciated.
Thanks
Try this:
Code:Using client = New Net.WebClient()
'//the web page to download
Dim source = client.DownloadString("http://www.google/com")
If Not String.IsNullOrEmpty(source) Then
'//split the source on each new line
Dim lines = source.Split(New String() {Environment.NewLine}, _
StringSplitOptions.None)
For Each line In lines
'//do something
Next
End If
End Using
that didn't work, a page of 538 lines was read in an array with this method for only 14 lines.