0

I've got two very simple routes. One works and pass the first parameter (year) into the controller and the other send the parameter in as "text". I just don't get it.

Below are my two routes I've defined. they seem identical to me in shape.

the controllers are just..

         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
                  });
4

1 に答える 1

0

私はここで問題を引き起こしている他の問題を抱えていました。

于 2013-01-25T19:30:06.830 に答える