如何将MVC Areas中的某一个页设为起始页
2024-08-26 21:39:54
area的默认页:
routes.MapRoute(
name: "MyArea",
url: "{controller}/{action}/{id}",
defaults: new { controller = "Home", action = "Index", id = UrlParameter.Optional },
namespaces: new[] { "MvcWeb.Areas.Members.Controllers" }
).DataTokens.Add("Area", "Members");
设置默认控制器:
routes.IgnoreRoute("{resource}.axd/{*pathInfo}");
routes.MapRoute(
"Default",
"{controller}/{action}/{id}",
new { controller = "Login", action = "Index", id = UrlParameter.Optional }
);
最新文章
- 学习zepto.js(对象方法)[4]
- C# partial 學習筆記
- VM出现该虚拟机正在使用中的提示,让获取所有权限解决办法
- MATLAB for循环优化三例
- LeetCode:5_Longest Palindromic Substring | 最长的回文子串 | Medium
- Greedy:Protecting the Flowers(POJ 3262)
- OC接收数据时毫秒转date时间最简略方法
- mac下的ssh自动登陆
- PCL—低层次视觉—点云分割(超体聚类)
- 前端开发中的一些chrome插件推荐
- lnmp 60秒的服务器缓存时间
- struts2摘记
- [2017-08-09]一则使用WinDbg工具调试iis进程调查内存占用过高的案例
- jQuery常用事件及扩展
- C#中字符串的字面值(转义序列)
- Windows Server 2008 R2 服务器系统安装及配置全过程图文详解
- 详细分析MySQL事务日志(redo log和undo log)
- centos7 系统优化
- BI使用者的角色
- web操作文件的上传到服务器 并可下载 并且读取出来