Action DNS query function csharp

20. December 2006

try
{

//performs the DNS lookup
IPHostEntry he = Dns.GetHostByName(domain);
IPAddress[] ip_addrs = he.AddressList;
txtIPs.Text = "";
foreach (IPAddress ip in ip_addrs)
{
IPs.Text += ip + "\n";
}
}
catch (System.Exception ex)
{
TextBox.text = ex.ToString();
}


Author: Aamir Hasan     औथोर: आमिर हसन       أثر أمير حسن .

ALL, asp.net, asp.net 4.0, CSharp, Network


Comments

Add comment


(Will show your Gravatar icon)

  Country flag

biuquote
  • Comment
  • Preview
Loading





User Name: Guest

Your Ip: 38.107.191.90
Time: