I made a button with this code. It should read a website line by line(loop for each line) and do this loop for each counter. For example I have a listbox1 containing satan; n44bj; jfa88; acerobert then I want the button to search this site and add the lines ending with lowercased listbox1 items found to listbox2.
When I use this code it only looks for the first item on listbox1 and it doesnt continue to do the loops for the other indexes on listbox1. Any1 have a solution for me?
Thanks in advance
VB.NET:
Dim request1 As System.Net.HttpWebRequest = System.Net.HttpWebRequest.Create("http://xwis.net/ladders/ra2/?pure")
Dim response1 As System.Net.HttpWebResponse = request1.GetResponse()
Dim sr1 As System.IO.StreamReader = New System.IO.StreamReader(response1.GetResponseStream())
Dim MatchedLine As String = ""
Dim counter As Integer = -1
ListBox2.Items.Clear()
For counter = 0 To (ListBox1.Items.Count - 1)
Do While sr1.Peek <> -1
MatchedLine = sr1.ReadLine()
If MatchedLine.EndsWith(LCase(ListBox1.Items.Item(counter))) Then ListBox2.Items.Add(MatchedLine)
Loop
Next counter
When I use this code it only looks for the first item on listbox1 and it doesnt continue to do the loops for the other indexes on listbox1. Any1 have a solution for me?
Thanks in advance
Last edited: