I am writing a new MVC App; I want to make some changes to the routing to add department name to the URL.
The following is what is generated by VS 2012.
routes.IgnoreRoute("{resource}.axd/{*pathInfo}")
routes.MapRoute( _
name:="Default", _
url:="{controller}/{action}/{id}", _
defaults:=New With {.controller = "Home", .action = "Index", .id = UrlParameter.Optional} _
)
I want to pass the department name in the beginning of the path. ex.
http: // localhost: /hr/Home/Contact
http: //localhost /hr/Home/About
http: //localhost /finance/Home/Contact
http: //localhost /finance/Home/About
http: //localhost /marketing/Home/Contact
http: //localhost /marketing/Home/About
Instead of the default pages:
http: //localhost /Home/About http: //localhost /Home/Contact