Is anyone knows how to Configure Areas in ASP.NET MVC3.
I read an article about Areas in here.
But that article is not based on MVC3.
In MVC3 there is no function named
You can have the same controller name in the root and the area, you just have to define it.
In your global.asax, add the last line of the routes.maproute as shown below
routes.MapRoute(
"Default", // Route name
"{controller}/{action}/{id}", // URL with parameters
new { controller = "Home", action = "Index", id = UrlParameter.Optional },// Parameter defaults
new[]{"YourNameSpace.Controllers"}
);
also, add the name of the controller in your ares/?????AreaRegistration.cs file
context.MapRoute(
"Membership_default",
"Membership/{controller}/{action}/{id}",
new { controller= "Home", action = "Index", id = UrlParameter.Optional }
);