我有以下代码:
public static void RegisterRoutes(RouteCollection routes)
{
routes.IgnoreRoute("{resource}.axd/{*pathInfo}");
routes.LowercaseUrls = true;
routes.MapRoute(
name: "CompanyDefault",
url: "Company",
defaults: new { controller = "Company", action = "Index" }
);
routes.MapRoute(
name: "Default",
url: "{controller}/{action}/{id}",
defaults: new { controller = "Home", action = "Index", id = UrlParameter.Optional }
);
我这样写的时候工作正常:
@Url.Action("ApplicationDriverForm", "ApplicationDriver")
但是当我尝试使用参数:
时@Url.Action("ApplicationDriverForm", "ApplicationDriver", new { PaRaMeTeRwithUppercaseLetters = "BlaBlaBla" })
然后在这种情况下,它会在参数名称和参数值
中生成带大写字母的url如何让它在参数中生成小写字母?