How to know the latitude and longitude of a given address

Hi ,
if I supply the details like
Zip Code:
in an page

How can I get the values of the latitude and longitude of the address using C#
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Ramkisan JagtapLead DeveloperCommented:
you can use google maps api.
Refer following link
mauneeldAuthor Commented:
Hi RamKisan,

I am unable to find the code snippet which takes in address as the input from the user and then give the coordinates i.e..., latitude and longitude of that address.

Ramkisan JagtapLead DeveloperCommented:
please che following example link. View source for code.
Cloud Class® Course: CompTIA Healthcare IT Tech

This course will help prep you to earn the CompTIA Healthcare IT Technician certification showing that you have the knowledge and skills needed to succeed in installing, managing, and troubleshooting IT systems in medical and clinical settings.

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Google Maps geocoding service can be used.
Since the question was about C# you may use this small C# wrapper of the Google Maps geocoding service:

private static readonly List<string> Addresses = new List<string> 
    "1600 Amphitheatre Parkway, Mountain View, CA 94043",       // Google 
    "1 Microsoft Way, Redmond, WA 98052",                       // Microsoft 
    "1601 S. California Ave., Palo Alto, CA 95304",             // Facebook 
    "701 First Ave, Sunnyvale, CA 94089"                        // Yahoo 
// The API is rate limited.  1 request every 0.5 seconds seems to keep Google happy. 
private static readonly int DelayInMs = 500; 
static void Main(string[] args) 
    foreach (string address in Addresses) 
            .ForEach(coordinate => DisplayCoordinate(coordinate, address)); 
private static void DisplayCoordinate(GeographicCoordinate coordinate, string address) 
    Console.WriteLine("Geographic coordinate for '{0}':", address); 
        "\t* Latitude: {0}, Longitude: {1}", 

Open in new window

mauneeldAuthor Commented:
Hi ggeek,
For the code which you supplied needs to have a key...but I dont have a key since I do not have an URL...
Is there a way to get a key without providing the URL
mauneeldAuthor Commented:
Hi Ramkisan,

I am getting the address correctly, but how do I find the latitude and longitude of the specified address?
With the code over the link

I am unable to still find the latitude and longitude of a given location.
mauneeldAuthor Commented:
Solution was easy to follow
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.