gpt4 book ai didi

asp.net - MVC 5 更改主页

转载 作者:行者123 更新时间:2023-12-01 00:40:40 25 4
gpt4 key购买 nike

我有 MVC5 应用程序,它按预期在本地运行,当我运行它时它会自动运行打开主页, View 中有其他文件夹,我可以导航到它们通过指定路径(例如 http://12.0.0.1:80/List/Index )现在我想更改它,当我运行主项目时(http://12.0.1:80/List/Index ) 0.1:80)它会自动打开页面 http://12.0.0.1:80/List/Index ,我该怎么做?

最佳答案

进入项目 App_Start 文件夹中的 RouteConfig.cs 文件,并将默认路由约束更改为 controller="List"而不是 controller="Home"

关于asp.net - MVC 5 更改主页,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/22612001/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com