当前位置:网站首页>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 !
边栏推荐
- Docker compose configuration mysql, redis, mongodb
- Drools dynamically add, modify, and delete rules
- drools执行完某个规则后终止别的规则执行
- Addition, deletion, modification and query of MySQL table (Advanced)
- Rust search server, rust quick service finding tutorial
- bellman-ford AcWing 853. 有边数限制的最短路
- async/await 异步函数
- 区间DP AcWing 282. 石子合并
- 线性DP AcWing 897. 最长公共子序列
- 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
猜你喜欢

堆(優先級隊列)

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

Sort---

Deep Copy Event bus

哈希表 AcWing 840. 模拟散列表

This "little routine" is set on the dough cake of instant noodles. No wonder programmers are always hungry

高性能纠删码编码

Sparkcontext: error initializing sparkcontext solution

Lekao.com: experience sharing of junior economists and previous candidates in customs clearance

AI中台技术调研
随机推荐
Why do programmers have the idea that code can run without moving? Is it poisonous? Or what?
考研英语二大作文模板/图表作文,英语图表作文这一篇就够了
H5 to app
bellman-ford AcWing 853. 有边数限制的最短路
Adding database driver to sqoop of cdh6
BOM DOM
JSON序列化 与 解析
China traffic sign detection data set
Go learning notes - go based interprocess communication
Redis avalanche, penetration, breakdown
Interview with meituan, a 34 year old programmer, was rejected: only those under the age of 30 who work hard and earn little overtime
IPhone 6 plus is listed in Apple's "retro products" list
Calculate the maximum path sum of binary tree
Use sqoop to export ads layer data to MySQL
ThreadLocal的简单理解
Experiment of connecting mobile phone hotspot based on Arduino and esp8266 (successful)
arcgis js 4. Add pictures to x map
AI中台技术调研
Fluent fluent library encapsulation
单指令多数据SIMD的SSE/AVX指令集和API