VB.NET tutorial : How to create simple application WHOIS Lookup Tool find IP Address of Host using System.net namespace
VB.NET For Beginner - How to find IP Address of Host and show in the textbox using System.net Namespaces .NET language? You can try to pass your LocalHost and get the result is your server ip address.
Please Read :
We can use System.net Namespaces, just write following source code above :
Just RUN our simple application and put an Hostname with yours and get the result
Please Read :
We can use System.net Namespaces, just write following source code above :
Imports System.Net ' using system net namespaces
Public Class Form1
Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click
' declare the texboxt1 is a hostname
Dim hostname As IPHostEntry = Dns.GetHostByName(TextBox1.Text)
'declare the ip address
Dim ip As IPAddress() = hostname.AddressList
' show ip address in the textbox2
TextBox2.Text = ip(0).ToString()
End Sub
End Class
Just RUN our simple application and put an Hostname with yours and get the result
COMMENTS