How do I call a static method? I want to call this from a class I have created, I want to get the location from IP. I\'ve declared it but what I need to do is call the method...
There you go
static void GetLocationFromIP()
{
string strIPAddress = Request.UserHostAddress.ToString();
strIPAddress = Request.ServerVariables["HTTP_X_FORWARDED_FOR"];
if (strIPAddress == null || strIPAddress == "")
{
strIPAddress = Request.ServerVariables["REMOTE_ADDR"].ToString();
}
string city = string.Empty;
string region = string.Empty;
string country = string.Empty;
double latitude = -1.00;
double longitude = -1.00;
LocationTools.GetLocationFromIP(strIPAddress, out city, out region, out country, out latitude, out longitude)
}