很簡單的基本的問題 我只有路線:asp.net的MVC路由「的觀點沒有被發現」
routes.MapRoute(
"Widget", // Route name
"Widget/Frame/{postUrl}", // URL with parameters
new { controller = "Widget", action = "Index", postUrl = UrlParameter.Optional } // Parameter defaults
);
,當我嘗試打開以下網址:「HTTP://本地主機:50250 /控件/幀/ QWERTY」
我有一個錯誤:
The view 'qwerty' or its master was not found or no view engine supports the searched locations. The following locations were searched:
嗯......爲什麼呢?
控制器代碼:
public class WidgetController : Controller
{
//
// GET: /Widget/
public ActionResult Index(string postUrl, int? blogEngineType)
{
return View(postUrl);
}
}
向我們顯示控制器Widget的操作幀的代碼。 – 2012-03-12 22:30:29
但我並沒有幀動作唯一索引。無論如何看到更新。 – Neir0 2012-03-12 22:32:39
看到這個: - http://stackoverflow.com/questions/6118840/mvc3-and-rewrites/8255132#8255132 – 2012-03-15 04:51:37