how can i change the default route from home/index to area/controller/action
routes.MapRoute(
null,
"{area}/{controller}/{action}/{id}",
"~/User/UserView/Index"
);
is that wrong?
how can i change the default route from home/index to area/controller/action
routes.MapRoute(
null,
"{area}/{controller}/{action}/{id}",
"~/User/UserView/Index"
);
is that wrong?
if I understand correctly you want to change the default landing for routes. To do that you would implement something similar to this.
routes.MapRoute(
name: "Default",
url: "{area}/{controller}/{action}/{id}",
defaults: new {area = "User" ,controller = "UserView", action = "Index", id = UrlParameter.Optional }
);
If you want this to take precedence over other routes make sure this is mapped before your other routes