I want to remove Controller
named Home
from url
when user clicks on About
and Contact
pages in ASP.NET MVC
routes.MapRoute(
name: "Default",
url: "{controller}/{action}/{id}",
defaults: new { controller = "DefaultControllerName", action = "Index", id = UrlParameter.Optional }
);
If u will specify the controller name then this will work with that controller name. Bu if not the by default it will take controller name as DefaultControllerName.