首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 网站开发 > asp.net >

asp.net mvc怎么设置起始页

2012-03-15 
asp.net mvc如何设置起始页今天给asp.net mvc框架设置Index.aspx为起始页。设置后,起始页的路径由http://lo

asp.net mvc如何设置起始页
今天给asp.net mvc框架设置Index.aspx为起始页。
设置后,起始页的路径由http://localhost/Home,变成了http://localhost/Views/Home/Index.aspx。请问如何才能改回去?



[解决办法]
或者你将
 routes.MapRoute(
"Default", // Route name
"{controller}/{action}/{id}", // URL with parameters
new { controller = "Home", action = "Index", id = "" } // Parameter defaults
);
改成其他的
如果
 routes.MapRoute(
"Default2", // Route name
"{controller}/{action}/{id}", // URL with parameters
new { controller = "Home", action = "Index", id = "" } // Parameter defaults
);

热点排行