Hi, This is an old code I have dug up, and I do remember it working, at least I think it was this exact code. Anyways, I'm trying to download a WebPage as a String, which works, however, I can not parse each line of Html at a time. I can either, Parse each Character, or parse the whole thing as a single String. Here's my code:
Code:Public Class Form1 Private WithEvents WC As New Net.WebClient Private Sub WC_StringFinished(ByVal sender As System.Object, ByVal e As Net.DownloadStringCompletedEventArgs) Handles WC.DownloadStringCompleted Dim htmlLines() As String = e.Result.Split(New String() {Environment.NewLine}, StringSplitOptions.None) For Each i As String In htmlLines ComboBox1.Items.Add(i) Next End Sub Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click WC.DownloadStringAsync(New Uri("http://www.google.ca/search?hl=en&q=Mal1t1a&btnG=Google+Search&meta=&aq=f&oq=")) End Sub End Class




Reply With Quote