Here is the code for displaying the IP Address of your visitor in ASP.NET
string trueip = string.Empty;
ip = HttpContext.Current.Request.ServerVariables["HTTP_X_FORWARDED_FOR"];
string iprange = ip.Split(',');
trueip = iprange.Trim();
trueip = HttpContext.Current.Request.ServerVariables["REMOTE_ADDR"];
Hope this comes handy
thanks for the replay in advance but i need to know what data tye u have selected for ip... u have declared string as trueip .. but what type of data came in ip...
Forgot to declare "ip"?
Sorry for the late reply guys I was busy...
The ip is a String Type
just add this before
This topic is now closed. New replies are no longer allowed.