我如何在ASP.Net MVC摆脱家庭的? [英] How do I get rid of Home in ASP.Net MVC?
本文介绍了我如何在ASP.Net MVC摆脱家庭的?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我知道这个网站使用ASP.Net MVC和我没有看到/家的网址写的。这证明,我认为是可以做到的。我需要什么特殊的路由和?
I know this site is written using ASP.Net MVC and I do not see "/Home" in the url. This proves to me that it can be done. What special route and do I need?
推荐答案
只要改变家为空字符串。
Just change "Home" to an empty string.
routes.MapRoute(
"Home",
"",
new { action = Index, controller = Home }
);
这篇关于我如何在ASP.Net MVC摆脱家庭的?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文