0
In my application I have an area with several links of categories that is a Partialview.
The categories below comes from the following statement of Categoriascontroller
var categorias = db.Categorias.ToList();
Shoes | Health and Beauty | Supermarkets | Restaurants
To Actionresult of Partialview coded below gets to know which link the user clicked, through a Tempdata("filtroSelected").
[AllowAnonymous]
public ActionResult _CatalogoFiltroCategoria()
{
TempData.Keep("filtroSelecionado");
var categorias = db.Categorias.ToList();
return PartialView(@"~/Views/Anuncios/_CatalogoFiltroCategoria.cshtml", categorias);
}
How do I make var categories set the selected link as the first of Tolist().
Click on Restaurants return me to the list like this.
Restaurants | Footwear | Health and Beauty | Supermarkets
Click on Health and Beauty return me to the list with Health and Beauty at the top of the list
Health and Beauty | Shoes | Supermarkets | Restaurants
I confess that I did not understand your answer, I would give to exemplify better ?
– Cyberlacs
edited in more detail
– Lucas Miranda