我是新來的MVC(和ASP.Net路由)。我試圖將* .aspx映射到名爲PageController
的控制器。ASP.Net MVC路由映射
routes.MapRoute(
"Page",
"{name}.aspx",
new { controller = "Page", action = "Index", id = "" }
);
豈不上述地圖*的.aspx代碼PageController
?當我運行這一點,並鍵入任何.aspx頁面中我得到以下錯誤:
The controller for path '/Page.aspx' could not be found or it does not implement the IController interface. Parameter name: controllerType
有什麼事我不是在這裏做什麼?