Protected Sub btnSubmit_Click(ByVal sender As Object, ByVal e As EventArgs)
DNSLookup(txtDomain.Text)
End Sub
Protected Sub DNSLookup(ByVal domain As String)
Try
'performs the DNS lookup
Dim he As IPHostEntry = Dns.GetHostEntry(domain)
Dim ip_addrs As IPAddress() = he.AddressList
txtIPs.Text = ""
For Each ip As IPAddress In ip_addrs
txtIPs.Text = ip.ToString()
Next ip
Catch ex As System.Exception
lblStatus.Text = ex.ToString()
End Try
End Sub
End Class