Here is an example of how to do it :
public void GetCoOrdinates(string street, string city, string state)
{
string serviceUri = string.Format("http://rpc.geocoder.us/service/rest?address={0},{1},{2}", street, city, state);
XmlDocument serviceXmlDoc = new XmlDocument();
serviceXmlDoc.Load(serviceUri);
XmlNamespaceManager geoCoderManager = new XmlNamespaceManager(serviceXmlDoc.NameTable);
geoCoderManager.AddNamespace("geoCoderService", @"http://www.w3.org/2003/01/geo/wgs84_pos#");
string longitude = serviceXmlDoc.DocumentElement.SelectSingleNode(@"//geoCoderService:long", geoCoderManager).InnerText;
string latitude = serviceXmlDoc.DocumentElement.SelectSingleNode(@"//geoCoderService:lat", geoCoderManager).InnerText;
MessageBox.Show(String.Format("Latitude: {0} Latitude: {1}", latitude, longitude));
}
instead of a message box you can just write
Response.Write()
or similar for a web app.
Hope this helps