I have a table with 3 entries in addition to the Id. I want a select list to show all entries in a row, for better identification of the data. Right now select only show me either the value (Id) or one text(one field) from table
ex.
- <select id="Location" class="form-control border-warning" asp-items="Model.Locations">
- <option value="">--Select Asset Location--</option>
- </select>
In the table I have the following fields Id, Location, City, Country
- Locations = await _context.WOAssetLocations.Where(s => s.OrgID == orgid)
- .Select(s => new SelectListItem
- {
- Value = s.WOALId.ToString(),
- Text = s.AssetLocation
- }).ToListAsync();
get me only one field, depending on my choice, either Location, City or Country. This is good but the select I want to show in a row all values coresponding to Id