get user ip address
Hi,
I want to capture user ip address but some reason i am getting different values:
method 1:
Dim strHostName As String = System.Net.Dns.GetHostName()
Dim clientIPAddress As String = System.Net.Dns.GetHostAddresses(strHostName).GetVa lue(0).ToString()
method 2:
Dim k As String = Request.ServerVariables("remote_addr")
Donno which one i should use.
thanks
__________________
Cheers
Sheraz
|