views:

26

answers:

1

I have an Area called PlanningBoard which has a controller called PlanningBoardController and a view in \areas\PlanningBoard\Views\PlanningBoard\Index.aspx.

However my url says; http://localhost:55736/PlanningBoard/PlanningBoard but I'd like it to say http://localhost:55736/PlanningBoard.

I know I must be missing some rather large point about Areas but I can't see it at the moment.

Any help here would be really appreciated.

+2  A: 

The only way I see this happening is if you have your route setup to duplicate your area or you have an area hardcoded.

Check out this link for how to setup your routes for areas:

Microsoft ASP.NET MVC - Areas

Sounds like like you have something like:

context.MapRoute(
    "planningboard_default",
    "planningboard/{area}/{controller}/{action}/{id}",
    new { action = "Index", id = UrlParameter.Optional }
);
Kelsey
He knew the risks! :)
griegs