'Details' in asp.net mvc routing doesn't seem to get removed....
- by Pandiya Chendur
I am trying to remove Details from http://localhost:1985/Materials/Details/2/Steel but some how my route doesn't seem to work...
public static void RegisterRoutes(RouteCollection routes)
{
routes.IgnoreRoute("{resource}.axd/{*pathInfo}");
routes.MapRoute(
"Default",
"{controller}/{action}/{id}",
new { controller = "Materials", action = "Index", id = "" }
);
routes.MapRoute(
"Details View",
"{controller}/{id}/{name}",
new { controller = "Materials", action = "Details", id = "",
name = "" }
);
}
What am i doing wrong? Any suggestion....