Wednesday 13 February 2013

Get a list of countries for a dropdown

This is a surprisingly difficult question to answer, as it's not all as simple as just adding the System.Globalization namespace and getting stuck in.

It appears that there are in fact a large amount of incorrect / incomplete answers on the subject.

There is a web service that you could add and call which may prove to be more up-to-date than the .NET framework itself, but the easiest, fastest and WORKING method of adding countries to a drop-down is to use the method mentioned in this StackOverflow question:

It's a life-saver!

No comments: