T
thomasabcd
Hi,
During the user's registration I wan't to geo-code an address using
localsearchmaps.com/geo. For that purpose I use a webrequest like this:
string url = "http://www.localsearchmaps.com/geo/?street=" +
StreetNumber + "+" + StreetName + "&city=" + City +
"&country=DK&google2=1";
System.Net.WebRequest webRequest =
System.Net.HttpWebRequest.Create(url);
webRequest.Timeout = webRequest.Timeout * 10;
System.Net.WebResponse webResponse = webRequest.GetResponse();
System.IO.StreamReader reader = new
System.IO.StreamReader(webResponse.GetResponseStream());
string html = reader.ReadToEnd();
reader.Close();
I then pull out the information I need from the html-string.The problem
is, that it sometimes is a bit slow to request the information from the
Internet, and the user is therefore kept waiting. Is there a faster way
to do get the info from the net? Maybe an asynchronous call of some
sort?
TIA
During the user's registration I wan't to geo-code an address using
localsearchmaps.com/geo. For that purpose I use a webrequest like this:
string url = "http://www.localsearchmaps.com/geo/?street=" +
StreetNumber + "+" + StreetName + "&city=" + City +
"&country=DK&google2=1";
System.Net.WebRequest webRequest =
System.Net.HttpWebRequest.Create(url);
webRequest.Timeout = webRequest.Timeout * 10;
System.Net.WebResponse webResponse = webRequest.GetResponse();
System.IO.StreamReader reader = new
System.IO.StreamReader(webResponse.GetResponseStream());
string html = reader.ReadToEnd();
reader.Close();
I then pull out the information I need from the html-string.The problem
is, that it sometimes is a bit slow to request the information from the
Internet, and the user is therefore kept waiting. Is there a faster way
to do get the info from the net? Maybe an asynchronous call of some
sort?
TIA