重定向(URl)提供“controller \ view \ URI”模式,但我只想要URI
答案 0 :(得分:0)
这很简单!
转到RouteConfig.cs并在
之前 routes.MapRoute(
name: "Default",
url: "{controller}/{action}/{id}",
defaults: new { controller = "Home", action = "Index", id = UrlParameter.Optional }
);
放一条线:
routes.MapRoute("SignUp", "signup", new { controller = "SignUp", action = "Index" });
其中: