Here is my route setup:
routes.MapRoute( name: "MyRoute", url: "Secret/{source}/{display}/{sort}/{tags}/{filter}/{pageSize}/{page}", defaults: new { controller = "Secret", action = "Index", page = 1, filter = "-", tags = "-" }, namespaces: new[] { "SomeProject.Controllers" } );
When I access this url:
http://localhost:12345/Secret/SourceHere/Gallery/Score/-/-/26
and my opinion has this markup:
<a href="@Url.Action("Index", new { tags = @tagInfo.Tag })">
then the resulting URL in the link:
http:
Although I canโt find the official documentation for it, everything that I read on SO, Google, etc., says that the route values โโshould be saved. Well, I worked around this, each time indicating all the route values, but that sucks.
Why are my route values โโnot saved?
EDIT my answer below is not quite right. In another view / situation, the rules do not apply there. Can anyone explain with absolute certainty the rules about when route values โโare remembered or not?
Routes infuriate me.
source share