i wanna filter Categoria in controller Index passing to view index
// GET: Submissions
public async Task<IActionResult> Index(int categoria)
{
var designContext = _context.Submissions.Include(s => s.CategorieNavigation);
ViewData["Categoria"] = new SelectList(_context.Categories, "IdCategoria", "Categoria");
return View(await designContext.ToListAsync());
}
<form asp-action="Index" method="get">
<select asp-for="@ViewData["Categoria"]" asp-items="(SelectList)@ViewData["Categoria"]"></select> <-------error here
<input type="submit" value="Filter" class="btn btn-default" />
</form>
the problem is that the dropdown is orphan
any sugestions?