Questions tagged [asp.net-mvc-areas]

An organizational concept present in ASP.NET MVC, that allows the developer to partition a large web application into smaller units.

An organizational concept present in ASP.NET MVC, that allows the developer to partition a large web application into smaller, distinct units. Areas might be used to, for instance, divide an application into inventory, review, storefront, and administration modules.

More information

575 questions
165
votes
3 answers

RedirectToAction between areas?

Is there a way to redirect to a specific action/controller on a different Area?
Jonathan
  • 32,202
  • 38
  • 137
  • 208
158
votes
9 answers

How to specify an area name in an action link?

I have a shared master page which I am using from 2 different areas in my mvc 2 app. The master page has an action link which currently specifies the controller and action, but of course the link doesn't work if I'm in the wrong area. I see no…
Jeremy
  • 44,950
  • 68
  • 206
  • 332
99
votes
13 answers

Having issue with multiple controllers of the same name in my project

I am running into the following error with my ASP.NET MVC 3 project: Multiple types were found that match the controller named 'Home'. This can happen if the route that services this request ('Home/{action}/{id}') does not specify…
mattruma
  • 16,589
  • 32
  • 107
  • 171
92
votes
3 answers

Force all Areas to use same Layout

I have the following project structure: /Views/Shared/_Layout; /Areas/Area1/Views/ControllerName/Index; ... /Areas/AreaN/Views/ControllerName/Index. Is there any way to force all areas to use the _Layout as a base layout? Is there any way to do…
Mikhail
  • 9,186
  • 4
  • 33
  • 49
83
votes
24 answers

The controller for path was not found or does not implement IController

I have an MVC4 project with language selection: en nl fr de 1 main part with: About Common (for the menu) Contact Faq Home And 3 areas: Admin Customers Shop In each area I have at least one controller, for example in Admin I have the…
reaper_unique
  • 2,916
  • 3
  • 28
  • 48
71
votes
8 answers

How to use an Area in ASP.NET Core

How do I use an Area in ASP.NET Core? I have an app that needs an Admin section. This section requires its Views to be placed in that area. All requests that start with Admin/ will need to be redirected to that area.
64
votes
8 answers

How can we set authorization for a whole area in ASP.NET MVC?

I've an Admin area and I want only Admins to enter the area. I considered adding the Authorized attribute to every controller in the Admin area. Isn't there an elegant solution or is this feature not there in the framework itself? EDIT: I'm sorry, I…
59
votes
17 answers

The view 'Index' or its master was not found.

The view 'Index' or its master was not found. The following locations were searched: ~/Views/ControllerName/Index.aspx ~/Views/ControllerName/Index.ascx ~/Views/Shared/Index.aspx ~/Views/Shared/Index.ascx I got this error when using ASP.Net mvc…
Fitzchak Yitzchaki
  • 9,095
  • 12
  • 56
  • 96
52
votes
6 answers

ASP.NET MVC `Html.ActionLink` between "Areas"

I have added a new Area to my MVC3 project and I am trying to link from the _Layout page to the new Area. I have added an Area called 'Admin' that has a controller 'Meets'. I used the visual studio designer to add the area so it has the correct area…
jcvandan
  • 14,124
  • 18
  • 66
  • 103
39
votes
1 answer

ASP.NET MVC Areas with shared layout

I have defined an area (Admin) in my ASP.NET MVC 3 application, created _ViewStart.cshtml in that area and addedLayout = "~/Views/Shared/_Layout.cshtml"; to it to have a unified site layout. I also added the following code to _Layout.cshtml: if…
Kamyar
  • 18,639
  • 9
  • 97
  • 171
36
votes
3 answers

How to Configure Areas in ASP.NET MVC3

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 MapRootArea in RouteCollection routes which is found in…
Imrul
  • 3,456
  • 5
  • 32
  • 27
33
votes
2 answers

How do I manage MVC areas and RenderAction in different controllers?

I have just added a new Admin area to my project as its started to get quite large and I want to keep it structured. I have a _ViewStart.cshtml view which sets a shared layout page to include a menu and a partial with some user information. As this…
jaffa
  • 26,770
  • 50
  • 178
  • 289
33
votes
1 answer

ASP.NET MVC ActionLink outside area

A simple task in MVC, sometimes becomes a hard challenge. Well,i have an Area called Admin. I've a page named "Forbidden" inside the Shared's directory in this area. The goal is simple: I need to create an Html.ActionLink that generates a link to…
ozsenegal
  • 4,055
  • 12
  • 49
  • 64
28
votes
8 answers

Administration Area in Asp.Net MVC

My question may be obvious but I'd like to build a well-designed web application. As for any administration area, the admin should be able to list/create/delete/modify users, articles, posts, etc... I'd like to know what is the best way to design…
Flesym
  • 573
  • 2
  • 9
  • 18
27
votes
2 answers

ASP.NET Help Pages default home page?

I want to go to http://myserver and be able to get Help Pages as the default home page, so the first thing a guest to http://myserver should see is the Help Page. I have a default route set up like this: public static void…
1
2 3
38 39