How can I get the local machine's IP address in a Test.aspx form ?[modified]
ASP.NET
4
Posts
4
Posters
0
Views
1
Watching
-
How can I get the local machine's IP address in a Test.aspx form ?
modified on Wednesday, September 16, 2009 11:43 PM
-
How can I get the local machine's IP address in a Test.aspx form ?
modified on Wednesday, September 16, 2009 11:43 PM
-
How can I get the local machine's IP address in a Test.aspx form ?
modified on Wednesday, September 16, 2009 11:43 PM
-
How can I get the local machine's IP address in a Test.aspx form ?
modified on Wednesday, September 16, 2009 11:43 PM
This works fine..
string hostName = System.Net.Dns.GetHostName();
string clientIP = System.Net.Dns.GetHostAddresses(hostName).GetValue(0).ToString();
Response.Write(clientIP);