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