asp.net mvc4 添加分区出现错误 找到多个与名为“home”的控制器匹配的类型

it2022-05-09  23

会出现如下错误” 找到多个与名为“home”的控制器匹配的类型“   在RouteConfig文件中添加命名空间可解决   routes.MapRoute(                 name: "Default",                 url: "{controller}/{action}/{id}",                 defaults: new { controller = "Home", action = "Index", id = UrlParameter.Optional },                  namespaces: new string[] { "Letter.Web.Controllers" }             );

转载于:https://www.cnblogs.com/shensigzs/p/4324039.html

相关资源:数据结构—成绩单生成器

最新回复(0)