2013-01-24 2 views
0

두 개의 매우 간단한 경로가 있습니다. 하나는 작동하고 첫 번째 매개 변수 (연도)를 컨트롤러에 전달하고 다른 매개 변수는 "텍스트"로 매개 변수를 보냅니다. 나는 단지 그것을 얻지 않는다.Routing Not Doing ASP.NET MVC4 Routes에서 기대할 수있는 것

다음은 내가 정의한 두 가지 경로입니다. 그들은 모양이 똑같아 보인다.

컨트롤러는

  public ActionResult Index(string year)... 

     // SESSIONS 
     routes.MapRoute("SessionRouteAll", "Session/{year}", 
        new 
        { 
         /* Your default route */ 
         controller = "Session", 
         action = "Index", 
         year = currentYear 
        }); 

     // SPEAKERS 
     routes.MapRoute("SpeakerRouteAll", "Speaker/{year}", 
        new 
        { 
         /* Your default route */ 
         controller = "Speaker", 
         action = "Index", 
         year = currentYear 
        }); 

답변

0

나는 문제의 원인이 여기에 다른 문제가 있었다 .. 단지입니다.