MVC视图与控制器分离简单描述
2015-06-30 22:33
267 查看
一,控制器
二,视图
CheckIndexAreaRegistration.cs public class CheckIndexAreaRegistration : AreaRegistration { public override string AreaName { get { return "CheckIndex"; } } public override void RegisterArea(AreaRegistrationContext context) { context.MapRoute( "CheckIndex_default", "CheckIndex/{controller}/{action}/{id}", new { action = "Index", id = UrlParameter.Optional }, new string[] { typeof(CheckIndexAreaRegistration).Namespace } //增加此行,不然会出现controller命名重复的exception ); } } ShowAllController.cs public class ShowAllController : BaseController { [SkipRole] public ActionResult Index() { return View(); } }
二,视图
相关文章推荐
- java中的list集合
- 用jsp+servlet写一个登陆界面
- 【数据结构】链表
- 几种常见模式识别算法整理和总结
- werkzeug源码阅读笔记(二) 上
- JAVA “Run as administrator” “UAC disabled” alternative solution
- <Android编程权威指南>课后练习和学习心得(1)
- 2015.6.30 第二堂 property
- Java - JSON Data Operation
- 黑马程序员——Java基础--常见对象总结(三)
- Jsp中EL表达式的使用
- Wamp5出现的问题
- mysql 5.6 调优
- 线性规划问题求解的几种可能结果及判定方法
- getApplicationContext和Activity.this两种上下文的区别
- android学习笔记(七)——数据共享
- 正则表达式,Java反射相关
- 最新CSDN博客积分规则和获取积分方法【官方的说明】
- UIActionSheet(操作列表)
- The MAX