在RouteConfig文件中添加命名空间可解决
routes.MapRoute(
name: "Default",
url: "{controller}/{action}/{id}",
defaults: new { controller = "Home", action = "Index", id = UrlParameter.Optional },
namespaces: new string[] { "Letter.Web.Controllers" }
);
routes.MapRoute(
name: "Default",
url: "{controller}/{action}/{id}",
defaults: new { controller = "Home", action = "Index", id = UrlParameter.Optional },
namespaces: new string[] { "Letter.Web.Controllers" }
);
本文介绍如何在RouteConfig文件中添加命名空间来解决路由配置问题,通过示例代码展示具体实现方法。
845

被折叠的 条评论
为什么被折叠?



