How to get Ip Address in a .NET application
In this article, I will explain how to get the Ip address of the client in a .NET application.
Get IP Address
When we are work with web application , client side is a very important factor, in dynamic webapplication it is necessary to know your client
Here I give an example to get Client IP Address
//create host object
string cname = System.Net.Dns.GetHostName();
//get the address into cid string variable
string cid = System.Net.Dns.GetHostAddresses(cname).GetValue(0).ToString();
//printing the values
Response.Write(cid);
Thank you shubhang sahai mathur
your code helped me a lot
Sabu Alex