4
How to make the routes of controllers and actions are all in lower case?
For example: instead of Noticias/Details
stick around noticias/details
.
4
How to make the routes of controllers and actions are all in lower case?
For example: instead of Noticias/Details
stick around noticias/details
.
6
It is possible to use a library (Nuget) to do this. There are indications how to install and use it. It is possible that the project has been abandoned. Alternative.
But if you are using . NET 4.5 or higher you can configure without libraries:
public static void RegisterRoutes(RouteCollection routes) {
routes.IgnoreRoute("{resource}.axd/{*pathInfo}");
routes.LowercaseUrls = true;
routes.MapRoute(
name: "Default",
url: "{controller}/{action}/{id}",
defaults: new { controller = "Home", action = "Index", id = UrlParameter.Optional }
);
}
I put in the Github for future reference.
Taken from response in the OS. In the same question there are other ways to do this.
Browser other questions tagged c# asp.net-mvc .net asp.net-mvc-5 asp.net-mvc-4
You are not signed in. Login or sign up in order to post.
This library is great. Thanks bro!
– Leomar de Souza