我的路線在Global.asax中像這 -Html.actionlink不產生正確的URL
routes.MapRoute(
"History", // Route name
"{controller}/{PageID}/{LanguageID}/{PreviousRevisionID}/{NewRevisionID}", // URL with parameters
new { controller = "UserArea", action = "Index", PageID = 0, LanguageID = 0, PreviousRevisionID = 0, NewRevisionID = 0} // Parameter defaults
);
我使用Html.actionLink使URL篩選。
@Html.ActionLink(item.CreatedTS.ToString(), "Index", new { PageID = item.PageID ,LanguageID = item.LanguageID , PreviousRevisionID = item.PreviousRevisionID , NewRevisionID = item.NewRevisionID , controller = "History" });
但是URL生成像這樣
http://localhost:2582/History?PageID=2&LanguageID=3&PreviousRevisionID=98&NewRevisionID=103
但我想URL篩選
http://localhost:2582/History/2/3/98/103
問題出在哪裏
嘿它工作感謝您的幫助 – user1006544