2
我有這樣的路由映射在Global.ascx:地圖自定義路由
routes.MapRoute(
"Help", // Route name
"Help", // URL with parameters
new { controller = "Home", action = "Help", id = UrlParameter.Optional } // Parameter defaults
);
因此,當用戶鍵入http://mysite.com/Help他會從Home.Help
行動的響應。
但如果我嘗試調用該航線與參數id=something
http://mysite.com/Help/something 我得到一個錯誤The resource cannot be found.
我怎麼能解決呢?