coolcurrent4u
Newcomer
- Joined
- Apr 30, 2011
- Messages
- 3
i have this code, with only one url at first, which seems to freeze the UI for about a minutes.
i wanted to get the web page html faster asynchronously, but this is not working for me
Is the httpwebrequest faster?
i wanted to get the web page html faster asynchronously, but this is not working for me
Is the httpwebrequest faster?
Code:
Private Sub Test(ByVal sender As Object, ByVal e As DownloadStringCompletedEventArgs)
Dim newstring As String = e.Result.ToString
listBox1.Items.Add ("Finished" & e.UserState.ToString)
End Sub
Sub Button1Click(sender As Object, e As EventArgs)
for each item as String in textbox1.Lines
Dim SiteURI As New Uri(item)
Dim wc As New WebClient
wc.DownloadStringAsync(SiteURI)
AddHandler wc.DownloadStringCompleted, AddressOf Test
next
End Sub