public static void RegisterRoutes(RouteCollection routes)
{
routes.IgnoreRoute("{resource}.axd/{*pathInfo}"); routes.MapRoute(
"Default", // 路由名称
"{controller}/{action}/{id}", // 带有参数的 URL
new { controller = "Record", action = "Index", id = UrlParameter.Optional }// 参数默认值
);
}
这是路由器的设置代码,运行程序就只能打开首页,点其他链接的时候都打不开相应的网页,都说找不到资源。MVC的路由设置,求大神指导,在线等!
{
routes.IgnoreRoute("{resource}.axd/{*pathInfo}"); routes.MapRoute(
"Default", // 路由名称
"{controller}/{action}/{id}", // 带有参数的 URL
new { controller = "Record", action = "Index", id = UrlParameter.Optional }// 参数默认值
);
}
这是路由器的设置代码,运行程序就只能打开首页,点其他链接的时候都打不开相应的网页,都说找不到资源。MVC的路由设置,求大神指导,在线等!
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货