MVC4 路由设置问题
我要实现 www.abc.com/News/11
routes.MapRoute(
"News",
"News/{id}",
new { controller = "News", action = "Index", id = UrlParameter.Optional }
);
后台
Public ActionResult Inxex(string id)
{
return View();
}
www.abc.com/News/11 找不到页
www.abc.com/News 这个可以 但是参数是NULL
求高手。。。。 路由设置