当前位置:网站首页>ASP. Net MVC default configuration, if any, jumps to the corresponding program in the specified area
ASP. Net MVC default configuration, if any, jumps to the corresponding program in the specified area
2022-07-02 12:39:00 【Time chaser】
Today, we are building a platform based on MVC Project , Because the project involves mobile phones and pc End , In order to facilitate and reduce the coupling between the two, I am in the area (Areas) Two are established in Program space , Then the problem comes. I want the program to jump to the one I specified by default areas How to do the corresponding project in ? In fact, it is not difficult to understand the principle of routing configuration , Look at my code :
public static void RegisterRoutes(RouteCollection routes) { routes.IgnoreRoute("{resource}.axd/{*pathInfo}"); routes.MapRoute( name: "Default", url: "{controller}/{action}/{id}", defaults: new { controller = "Defaults", action = "Index", id = UrlParameter.Optional }, namespaces: new string[] { "JTSD_Web.Areas.WebAdmins.Controllers" } // Specify a namespace to prevent the same controller name from being indistinguishable ( Give priority to default Route configured in , If you don't find it, you'll find it namesapces Medium ) ); }
Screenshot of project picture :
summary : Recently, there are too many projects. I always feel that I have no time to blog , In fact, it's all because I'm making excuses for being lazy , There is nothing lazy , Only oneself want to do !
边栏推荐
- Interview with meituan, a 34 year old programmer, was rejected: only those under the age of 30 who work hard and earn little overtime
- Dijkstra AcWing 850. Dijkstra求最短路 II
- 模块化 CommonJS ES Module
- OpenCV中cv2.VideoWriter_fourcc()函数和cv2.VideoWriter()函数的结合使用
- Docker compose configuration mysql, redis, mongodb
- PR 2021 quick start tutorial, learn about the and functions of the timeline panel
- 堆 AcWing 838. 堆排序
- 深拷贝 事件总线
- 寻找二叉树中任意两个数的公共祖先
- Leetcode - < dynamic planning special> Jianzhi offer 19, 49, 60
猜你喜欢
线性DP AcWing 897. 最长公共子序列
Initial JDBC programming
深拷贝 事件总线
Interview with meituan, a 34 year old programmer, was rejected: only those under the age of 30 who work hard and earn little overtime
Deep understanding of P-R curve, ROC and AUC
WSL 2 will not be installed yet? It's enough to read this article
The programmer and the female nurse went on a blind date and spent 360. He packed leftovers and was stunned when he received wechat at night
There is a hidden danger in CDH: the exchange memory used by the process of this role is XX megabytes. Warning threshold: 200 bytes
AAAI 2022 | Peking University & Ali Dharma Institute: pruning and compression of pre training language model based on comparative learning
Dijkstra AcWing 850. Dijkstra求最短路 II
随机推荐
使用Sqoop把ADS层数据导出到MySQL
Sparkcontext: error initializing sparkcontext solution
PR 2021 quick start tutorial, learn about the and functions of the timeline panel
High performance erasure code coding
Bom Dom
SparkContext: Error initializing SparkContext解决方法
Does C language srand need to reseed? Should srand be placed in the loop? Pseudo random function Rand
Simple understanding of ThreadLocal
Fastdateformat why thread safe
Lombok common annotations
Embedded Software Engineer career planning
哈希表 AcWing 840. 模拟散列表
Tas (file d'attente prioritaire)
Deep copy event bus
Leetcode - Sword finger offer 51 Reverse pairs in an array
Intel internal instructions - AVX and avx2 learning notes
spfa AcWing 852. spfa判断负环
LeetCode—剑指 Offer 37、38
[FFH] little bear driver calling process (take calling LED light driver as an example)
The programmer and the female nurse went on a blind date and spent 360. He packed leftovers and was stunned when he received wechat at night