当前位置:网站首页>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 .
边栏推荐
- CUB_200鸟类数据集关键点可视化
- Lvs+keepalived high availability deployment practical application
- About the writing of ALV format control part
- LVS+KeepAlived高可用部署实战应用
- Typescript from getting started to mastering (XXII) namespace namespace (I)
- How to understand "page storage management scheme"
- The const keyword of ES6 declares variables
- Ribbon principle analysis namedcontextfactory
- Solve the problem of garbled code when opening the project code in idea
- The digitalization of the consumer industry is upgraded to "rigid demand", and weiit's new retail SaaS empowers enterprises!
猜你喜欢

First knowledge of C language (3)

Basic configuration of BGP - establish peers and route announcements

Zhihuijun, a genius of Huawei, made a modular mechanical keyboard, which caused an earthquake in the geek circle. Netizens: This is the real customization

How to understand clock cycle and formula CPU execution time = number of CPU clock cycles / dominant frequency

HCIP BGP

内连接和左连接简单案例

Meeting notice of OA project (Query & whether to attend the meeting & feedback details)

How to understand "page storage management scheme"

Sunflower senior product director technology sharing: "how to apply national remote control" in AD domain environment

关于双指针的思想总结
随机推荐
How to understand "page storage management scheme"
About the writing of ALV format control part
Pointer of pointer???...
Several cases of word wrapping in div
After I get the winfrom specific control ID from the database, I need to find the corresponding control through this ID and assign a value to the text text of the control. What should I do
Batch production and upload sales NFT opensea eth polygon
初识C语言(3)
一文学透MySQL表的创建和约束
1985-2020(8个版次)全球地表覆盖下载与介绍
3. Solve pychart's error unresolved reference 'selenium' unresolved reference 'webdriver‘
Typescript from entry to mastery (XXI) generic types in classes
Pointer constant and constant pointer
Routing knowledge
Tristate gate
tron OUT_ OF_ ENERGY
Safari's compatibility with Z-index
Const read only variable constant
店铺排名问题,如何解决?
第一个ALV程序2
C language to achieve three chess game (detailed explanation)