What would be the best approach to have multiple options when using a ViewData for a dropdown list. Something like this
I am using:
ViewData["LocationId"] = new SelectList(_context.Location, "LocationId", "Address", employees.LocationId);
and it is only showing Address but I need it to :
City
Address
City, State, Postal
In the front end I am calling it like so:
<select asp-for="LocationId" asp-items="ViewBag.LocationId">
Can this be done using ViewData and selectList?
Thank you!