MVC6 Dropdownlist of Countries
|Added at||2016-01-12 09:01|
I am trying to use MVC6 Tag Helpers to create a dropdownlist of CountryCode and CountryName so that a user can select their country after registering. The relevant part of the view looks like this so far
The relevant part of the viewmodel looks like this
A Country looks like this
The controller returns a list of countries to the viewmodel
but in the view
Also I cannot find how in the form to specify CountryCode as the property to return and CountryName as the property to display.