当前位置:网站首页>Asp. Net MVC, how can the controller in the folder jump to the controller in the root directory?
Asp. Net MVC, how can the controller in the folder jump to the controller in the root directory?
2022-07-29 04:01:00 【A descendant of the sun】
Xiaobian developed some pages not long ago , The controller corresponding to each view should be aligned session Non empty verification , I thought it was perfect, but I didn't expect that the link given to me by the tester today was not adjusted session by null Login page when , What's more strange is that , Some pages can jump normally, and some pages cannot jump normally , After debugging step by step, Xiaobian finally found the problem , It is normal to jump when all controllers are under the root directory , Controllers not in the same directory also have different jump methods , Let's have a look
In the same directory , Normal jump
return RedirectToAction("MyList", "Treausre");
When you need to jump in different areas , We need to add routing items
return RedirectToAction("Index", "Home", new {
area = "Admin" });
If you want to jump from an area to the root directory ( Outside the area ) Controller view of ,area Item set to empty "" That's it
return RedirectToAction("Index", "Home", new {
area = "" });
Reference article Asp.Net MVC How the controller jumps to other areas (Area) Action results in (ActionResult)
Not long ago, I chatted with my cohabiting friends about work , He showed me his project , As a full stack Developer , When I saw his project requirements , I told him. , I still focus on the back end C# Probably better , Why? , Because his project is too complicated , I don't think oneortwo people can handle it at all , He replied. , Of course , This project has 5 Personal development .
There is no perfect person , Only the perfect team .
边栏推荐
- Data mining -- Introduction to the basis of association analysis (Part 1)
- [principle] several ways of horizontal penetration
- STM32F103ZET6程序移植为C8T6+C8T6下载程序flash timeout的解决方案
- C language to achieve three chess game (detailed explanation)
- Shopify卖家:EDM营销就要搭配SaleSmartly,轻松搞定转化率
- 【C语言入门】ZZULIOJ 1031-1035
- Meeting notice of OA project (Query & whether to attend the meeting & feedback details)
- Routing knowledge
- [introduction to C language] zzulioj 1031-1035
- Lvs+keepalived high availability deployment practical application
猜你喜欢

力扣面试题17.04 消失的数字||260.只出现一次的数字(内含位运算知识点)

Note: restframe work records many to one tables, how to serialize in that table (reverse query)

Why BGP server is used in sunflower remote control? Automatic optimal route and high-speed transmission across operators

HCIP BGP

OA项目之会议通知(查询&是否参会&反馈详情)

1985-2020(8个版次)全球地表覆盖下载与介绍

Shopify seller: EDM marketing should be combined with salesmartly to easily get the conversion rate

SQL窗口函数

安装ros的laser_scan_matche库所遇到的问题(一)
![[principle] several ways of horizontal penetration](/img/fc/2ef7dd6ebc5c0bd8f7d302d8b596d6.png)
[principle] several ways of horizontal penetration
随机推荐
SQL window function
[principle] several ways of horizontal penetration
C language to achieve three chess game (detailed explanation)
Code ~ hide or disable the status bar and virtual keys
力扣面试题17.04 消失的数字||260.只出现一次的数字(内含位运算知识点)
Data mining -- Introduction to the basis of association analysis (Part 1)
Object array merges elements according to a field
Safari's compatibility with Z-index
Arrow function of new features of ES6
Typescript from entry to mastery (XVIII) joint type and type protection
从2019 年开始,你一定停止使用了这个营销策略…
新零售O2O 电商模式解析
LDP -- label distribution protocol
LVS+KeepAlived高可用部署实战应用
Asp.net MVC中文件夹中的控制器如何跳转到根目录的控制器中?
面试必备!TCP协议经典十五连问!
[untitled]
tron OUT_ OF_ ENERGY
Typescript from getting started to mastering (XVI) configuration file - first knowledge of compileroptions configuration item
The function parameters of the new features of ES6 are assigned initial values and rest parameters