Convert Domain Name to I.P Address

A user asked me on the forums if it was possible to convert a domain name to an I.P. Address. 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 







Imports System.Net

Protected Sub Page_Load(ByVal sender As Object, _

                     ByVal e As EventArgs)

    For Each address As IPAddress In 



    Next address

End Sub

About The Author

Suprotim Agarwal
Suprotim Agarwal, Developer Technologies MVP (Microsoft Most Valuable Professional) is the founder and contributor for DevCurry, DotNetCurry and SQLServerCurry. He is the Chief Editor of a Developer Magazine called DNC Magazine. He has also authored two Books - 51 Recipes using jQuery with ASP.NET Controls. and The Absolutely Awesome jQuery CookBook.

Follow him on twitter @suprotimagarwal.


Unknown said...
This comment has been removed by the author.
Unknown said...

Informative blog really helpful for those who are looking for some programs to find the ip address of website ..I am not a techsavy so i usually find the ip address of any website using sites like here they will render domain host search tool which display the ip address of any website along with details like ip location ,country ,ISP address and so on ...