[Route("Home/Test/{pageIndex}")]
public ActionResult Test(int pageIndex)
{
return View();
}
global里面已经调用了
public static void RegisterRoutes(RouteCollection routes)
{
routes.IgnoreRoute("{resource}.axd/{*pathInfo}");
routes.MapRoute(
name: "Default",
url: "{controller}/{action}/{id}",
defaults: new { controller = "Home", action = "Index", id = UrlParameter.Optional }
);
routes.MapMvcAttributeRoutes();
}
方法,但是改变一下第三个参数的名称就找不到页面为什么?