I have default routes from mvc3 like
{root}/account/details/12开发者_如何转开发3
and I want -
{root}/a/123
I tried this -
routes.MapRoute(
"Accounts_details", // Route name
"a/{id}", // URL with parameters
new { controller = "account", action = "details", id = UrlParameter.Optional } // Parameter defaults
);
But it still gives me 404. What am i doing wrong?
Thanks.
Where this route is located? Is it's after the default route try to write it before default route.
精彩评论