Closed scascalesageinfoes closed 6 years ago
I'm afraid we don't support named routes. However, I think we could add a routename option without too much effort to make this work. Is that something you could give a try yourself with a pull request?
You could checkout the CustomRouteName branch, https://github.com/martijnboland/MvcPaging/tree/CustomRouteName
In this branch, the Pager has a new option .CustomRouteName(string customRouteName). See https://github.com/martijnboland/MvcPaging/commit/8819a792eccff224ee0d91d1cd6b9064a6a2fe81 for all changes, including a demo controller action and view.
Please let us know if something like this would work for you.
Perfect my friend! It works! Can you update the last versión of nuget with this change?
NuGet package is updated
Hello I have this: [Route("genericos-referencias}", Order = 3, Name = "appGenericosReferenciasController.Index.es")] [Route("{lang}/generic-references}", Order = 4, Name = "appGenericosReferenciasController.Index.en")] public async Task Index()
..
I want than MVC paging generate this link in every page: http://localhost:29553/generic-references?page=2
I try set: .PageRouteValueKey("appGenericosReferenciasController.Index.en")
But always get: http://localhost:29553/genericos-referencias?page=2
Any mehtod to override base URL of links? Thanks