0
我正在提出一個我認爲會被我的路線抓住的請求,但沒有匹配。我究竟做錯了什麼?MVC路由 - 爲什麼我的請求不匹配路由?
任何意見讚賞, 安德斯,丹麥
-
網址:
EventReponse/ComingAdmin/386/01e71c45-cb67-4711-a51f-df5fcb54bb8b
預計比賽:
routes.MapRoute(
"Editing event responses for other user", // Route name
"EventResponse/{action}/{eventId}/{userId}", // URL with parameters
new {controller = "EventResponse", action = "ComingAdmin"} // Parameter defaults
);
所需的控制器(但我想這並不進場):
public class EventResponseController : ControllerBase
{
(...)
public ActionResult ComingAdmin(int eventId, Guid userId)
{
return RegisterEventResponse(eventId, AttendanceStatus.Coming, userId);
}
}
良好的通話 - 而且快! 唉,它並沒有解決問題(本身)。 – 2010-05-17 07:37:56
我更新了答案,現在應該可以工作。 – Thomas 2010-05-17 08:00:35
神奇 - 所以它不是黑巫術!感謝,並有一個愉快的一天! – 2010-05-17 08:28:43