如何解析一个域名对应的IP是什么?
如何写代码?asp.net,C#
------解决方案--------------------using System.Net;
IPHostEntry hostInfo = Dns.GetHostByName( "www.contoso.com ");
Response.Write(hostInfo.AddressList[0]);
------解决方案--------------------IPHostEntry Host = Dns.GetHostEntry(Address);
------解决方案--------------------System.Net.IPHostEntry hostInfo = System.Net.Dns.GetHostByName( "www.csdn.net ");
Response.Write(hostInfo.AddressList[0]);