Created
April 10, 2014 13:22
-
-
Save jonathanread/47739331e7f29bea0d7a to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
CountryElement country = Config.Get<LocationsConfig>().Countries.Values.FirstOrDefault(c => c.IsoCode == countryCode.ToUpper()); | |
List<SelectListItem> statesList = new List<SelectListItem>(); | |
if (country != null) | |
{ | |
foreach (StateProvinceElement state in country.StatesProvinces) | |
{ | |
statesList.Add(new SelectListItem() | |
{ | |
Text = state.Name, | |
Value = state.Abbreviation | |
}); | |
} | |
} | |
dontShowPageData = true; | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment