How to remove index from url in asp.net mvc?
- by Pandiya Chendur
I am doing a return RedirectToAction("Index", "Clients"); from my home controller.... It is fine but my url looks like http://localhost:1115/Clients/Index... How to remove index from url in asp.net mvc? Any suggestion....
My routes,
public static void RegisterRoutes(RouteCollection routes)
{
routes.IgnoreRoute("{resource}.axd/{*pathInfo}");
routes.MapRoute(
"Registrations",
"{controller}/{action}/{id}",
new { controller = "Registration", action = "Create", id = "" }
);
}