Convert Domain Name to IP Address
Feb 9, 2010
How to convert Domain Name to IP Address in C#?
The answer is quiet simple. Just use the System.Net.Dns class
using System.Net;
protected void Page_Load(object sender, EventArgs e)
{
foreach (IPAddress address in Dns.GetHostAddresses("www.youraddress.com"))
{
Response.Write(address.ToString());
}
}
Share