What would I need to understand to implement two selectLists with the second dependent on the first? The make is selected which filters the engine sizes. This will eventually return the carDetails
public IActionResult Create()
{
ViewData["MakeId"] = new SelectList(_context.Sport, "MakeId", "MakeName");
ViewData["EngineId"] = new SelectList(_context.Venue, "EngineId", "EngineName");
return View();
}
I have researched the "where" function but cannot see how to make it work with this scenario.
The view currently uses "cshtml" (Razor) files. An example of the contents is:
<div class="form-group">
<label asp-for="MakeId." class="control-label"></label>
<select asp-for="MakeId" class="form-control" asp-items="ViewBag.MakeId"></select>
</div>