' Collection of code snippets by Arne Vajhøj 
' (likely posted to comp.os.vms/INFO-VAX, INFO-TPU, MACRO32, eksperten.dk, newz.dk, LinkedIn or other place sometime between 1990 and now) 
Imports System
Imports System.IO
Imports System.Net
Imports System.Text

Class MainClass
    Public Shared Sub Main(ByVal args As String())
        Dim req As HttpWebRequest = CType(WebRequest.Create("http://localhost/select.asp"), HttpWebRequest)
        Dim resp As HttpWebResponse = CType(req.GetResponse, HttpWebResponse)
        Dim stmrdr As StreamReader = New StreamReader(resp.GetResponseStream)
        Dim line = stmrdr.ReadLine
        While line <> Nothing
            Dim parts = line.Split(" ".ToCharArray)
            Dim f1 As String = parts(0)
            Dim f2 As String = parts(1)
            Console.WriteLine(f1 & " " & f2)
            line = stmrdr.ReadLine
        End While
        stmrdr.Close
        resp.Close
    End Sub
End Class
