Created
September 4, 2020 14:31
-
-
Save bjornmicallef/e1e964b96f308ca993a62dcd3efdb86a 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
public ActionResult Index() | |
{ | |
continents = new List(); | |
continents.Add(new SelectListItem { Text = "Select continent", Value = "0" }); | |
continents.Add(new SelectListItem { Text = "Europe", Value = "1" }); | |
continents.Add(new SelectListItem { Text = "North America", Value = "2" }); | |
continents.Add(new SelectListItem { Text = "South America", Value = "3" }); | |
ViewData["continents"] = continents; | |
countries = new List(); | |
countries.Add(new SelectListItem { Text = "Select country", Value = "0" }); | |
ViewData["countries"] = countries; | |
cities = new List(); | |
cities.Add(new SelectListItem { Text = "Select city", Value = "0" }); | |
ViewData["cities"] = cities; | |
return View(); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment