プロジェクトのルートに奇妙な問題が発生しました。ここに私のルートがあります:
// pennames
routes.MapRoute(
"pennames", // Route name
"MyHome/Authors/{action}/{id}", // URL with parameters
new { controller = "Author", action = "Index", id = UrlParameter.Optional } // Parameter defaults
);
// article
routes.MapRoute(
"article", // Route name
"MyHome/Articles/{action}/{id}", // URL with parameters
new { controller = "Article", action = "Index", id = UrlParameter.Optional } // Parameter defaults
);
サイト構造は次のとおりです:
Controllers
-> MyHome
--> AuthorController --> ArticleController
-
> Views
--> Article
---> Index.aspx
-> Author
-> Index.aspx
しかし、私が電話するとき
RouteTable.Routes.GetVirtualPath(this.viewContext.RequestContext..
/MyHome/Article ページから、常に最初のルート (MyHome/Author) を返します
私は何が間違っているのですか?