T4MVC: Areas name in URL is not lowercase

365 Views Asked by At

Good day!

I've the following link:

<%: Url.Action(MVC.Areas.Manage.Feedback.Index()) %>

And it is generated as /Manage/feedback. Action and controller names are in lowercase, but area name -- not.

I use latest T4MVC 2.6.43 with such settings:

// Choose whether you want to include an 'Areas' token when referring to areas.
// e.g. Assume the Area is called Blog and the Controller is Post:
// - When false use MVC.Blog.Post.etc...
// - When true use MVC.Areas.Blog.Post.etc...
static bool IncludeAreasToken = true;

// If true, use lower case tokens in routes for the area, controller and action names
static bool UseLowercaseRoutes = true;

Thanks in advance!

1

There are 1 best solutions below

0
On BEST ANSWER

Ah, my fault, I should change this to lowercase in ManageAreaRegistration.cs

public override void RegisterArea(AreaRegistrationContext context)
{
    context.MapRoute(
        "Manage_default",
        "manage/{controller}/{action}/{id}",
        new { action = "Index", id = UrlParameter.Optional }
    );
}