I have a problem with a MVC 3 Application…
If I have a link like this:
http://localhost:15838/ByBU/OpenTask/Details/Excess_Casualty/Index_Clear
and the route for this url is:
routes.MapRoute(
"OpenTaskDetails",
"{controller}/OpenTask/{action}/{BU}/{SLAName}",
new { controller = "ByBU", action= "Details", BU = "BU", SLAName = "SLAName" },
new [] { "SLA.Controllers" }
);
When I set a breakpoint at the first line of “Details” action the variables BU and SLAName are: Excess (instead of Excess_Casualty), and Index (instead of Index_Clear).
It worked fine before, and then all of a sudden stopped working and I have no clue why it does that. Any ideas?
Underscores are never recommended for URLs, so you may want to switch to dashes :
http://www.mattcutts.com/blog/dashes-vs-underscores/
“Google sees the dash as a word separator, while the underscore is perceived to be part of the word.”