Getting Client Ip address and computer name in c#
using system .net;
/* host address */
string strHostName = System.Net.Dns.GetHostEntry(Request.UserHostAddress).HostName;
lblip.Text = Request.UserHostAddress.ToString();
when you upload your code on server then in website you'll get your exact value.
/* host address */
string strHostName = System.Net.Dns.GetHostEntry(Request.UserHostAddress).HostName;
lblip.Text = Request.UserHostAddress.ToString();
when you upload your code on server then in website you'll get your exact value.
Comments
Post a Comment