ASP.NET MVC Controller与Areas下面的Controller同名的解决办法
来源:互联网 发布:海康设备域名怎么设置 编辑:程序博客网 时间:2024/06/05 06:20
代码
/Areas/Test/TestAreaRegistration.cs
context.MapRoute(
"Test_default",
"Test/{controller}/{action}/{id}/",
new { controller = "Home", action = "Index", id = UrlParameter.Optional },
new string[] { "Web.Areas.Test.Controllers"}
);
//Global.asax
routes.MapRoute(
"Home", // Route name
"{controller}/{action}/{id}/", // URL with parameters
new { controller = "Home", action = "Index", id = UrlParameter.Optional },
new string[] { "Web.Controllers"}
);
"Home", // Route name
"{controller}/{action}/{id}/", // URL with parameters
new { controller = "Home", action = "Index", id = UrlParameter.Optional },
new string[] { "Web.Controllers"}
);
- ASP.NET MVC Controller与Areas下面的Controller同名的解决办法
- ASP.NET MVC下面的Controller与Fckeditor.Controllers.HomeController同名的解决办法
- 如何在多个项目中分离Asp.Net Core Mvc的Controller和Areas
- ASP.NET MVC3 Areas 分离项目 同名控制器(同名Controller) 演示demo
- ASP.NET MVC3 Areas 分离项目 同名控制器(同名Controller) 演示demo
- Asp.net mvc Controller与 View之间的传递
- ASP.NET MVC Controller的激活机制
- ASP.NET MVC Controller的激活
- ASP.NET MVC Controller的激活
- ASP.NET Mvc 2.0 - 1. Areas的创建与执行
- ASP.NET Mvc Areas的创建与执行
- ASP.NET MVC 4 Controller与Action
- ASP.NET MVC学习笔记-Controller的ActionResult
- asp.net mvc的Routing、Controller、Filter学习笔记
- ASP.NET MVC——Controller的激活
- ASP.NET MVC学习笔记-Controller的ActionResult
- ASP.NET MVC学习笔记-Controller的ActionResult
- ASP.NET MVC中Controller的使用Demo
- 浅看rabbitmq的mnesia部署
- 快速排序
- Android模拟器无法上网的原因
- oracle数据块详解
- 【大学生活】在软件学院的那些课
- ASP.NET MVC Controller与Areas下面的Controller同名的解决办法
- 百度文库中的plone教程
- 修改mysql数据库密码后phpMyAdmin无法连接数据库
- Git分支管理策略
- MyEclipse/Eclipse安装Spket对ExtJS 4.1语法提示
- win7 Aero 问题
- 如何对字段进行相关的校验?
- apache 多站点配置
- struts2源码的解读