HAJJAJ HAJJAJ - 1 year ago 92
Vb.net Question

How to populate a dropdownlist with all countries?

Possible Duplicate:

Where can I get a list of all countries/cities to populate a listbox?

I'm trying to fill my dropdownlist with all world countries from windows, is there any way to make my dropdownlist get all countries from windows?

Or do anybody have a XML with all the list so I can use it?

Answer Source

Update 8/9/2016:

List of Countries

Just did a quick search and found this site:


Here's the direct link to the file:


Update: Code to populate your drop down list with the list of countries:

Dim doc = XDocument.Load("path to url\file")

Dim countries = From c in doc.Descendants("country")
                Select c.Value

For Each country In countries

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download