I want to add a simple route to my webapp, but it just doesn't work and i don't know why
code in global.asax.cs:
routes.MapRoute(
"BrowseGenre",
"{controller}/{action}/{genre}",
new {controller = "Store", action = "Browse", genre = UrlParameter.Optional}
);
code in StoreController.cs:
// GET: /Store/Browse
public ActionResult Browse(string genreName)
{
var genreModel = storeDB.Genres.Include("Albums").Single(g => g.Name == genreName);
//....
genreName is always null
the actionlinks are generated correctly (like domain.com/Store/Browse/Jazz