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
2
votes
1 answer

How to use one view, in two ASP.NET MVC areas?

I have an ASP.NET MVC application, and in it, I have set up two areas. However, there is one view that I have implemented in Area A, but I also need to use it in Area B. How can I render it in Area B? I mean, Html.RenderPartial method takes the name…
Rasoul Zabihi
  • 2,575
  • 2
  • 18
  • 10
2
votes
0 answers

Microsoft Identity UI Account Controller Customization 404

I have set up a Azure B2C OpenIdConnect system for our website using Microsoft Identity Web (https://github.com/AzureAD/microsoft-identity-web}. I could sign-in and out of the system with out issue. I can still sign-in but I am unable to sign-out…
2
votes
1 answer

ASP.NET MVC3 Routing various subfolders to the same controller

I'm trying to set up my MVC project to have URLs so that I can go to: /Groups/ /Groups/Register /Groups/Whatever But in my controller, I can also flag some actions as admin only, so that they are accessed at: /Admin/Groups/Delete/{id} I would…
2
votes
2 answers

Asp.net MVC RenderAction method in multiple controller

I am doing some plugin kind of work using asp.net mvc. I have two plugins(mvc projects) Say users and home. In both the plugins, I have Home Controllers. Yes the names are home controller in both the plugins(projects). When I build the project the…
2
votes
1 answer

How to use an area for login in ASP.NET Core 6 MVC

I used the default method to create an area. Right-click on project and add a new scaffolded item. Selected area, gave it a name and it created the folder structure. My area is called Login. I created a controller (in the Areas/Login/Controllers…
Rob Stewart
  • 441
  • 4
  • 14
2
votes
2 answers

MVC Futures strongly typed RenderAction with Areas and duplicate Controller Names

I'm trying to use an Html.RenderAction in a strongly typed nature from the MVC Futures library I have a Navigation action on my primary HomeController (area = "") that I'm trying to call from my Site.Master <%…
Anthony Shaw
  • 8,146
  • 4
  • 44
  • 62
2
votes
3 answers

Visual studio 2019 Add Area missing

Currently, I created a ASP.NET Core Web app using VS2019, came across that 'Add Areas' option is missing from Context menu. I tried this solution and Add New Scaffolded Item but there is no MVC Area option in below window:
2
votes
1 answer

How to render a partial in the main project from an area in MVC 3?

I have a MVC 3 Razor project. It has an area called Admin. I have the basic layout of the page in the project's Views/Shared folder (by default). I have a controller in the main project called Common. It will be in charge of certain parts of the…
Dan Appleyard
  • 7,405
  • 14
  • 49
  • 80
2
votes
1 answer

Html.BeginForm is automatically adding a sub-folder after the area

I have created an Area named B2b in my ASP.NET MVC application, and I have also created a sub-folder called Shopify under this area: In order to register the Shopify sub-folder, I have created a CustomViewEngine as below (followed this…
2
votes
1 answer

ASP.NET MVC 3 route issues

I'm working on the http://mvcforum.codeplex.com project. We have 2 areas, Forum and ForumAdmin. I have a few named routes, to make a nice URL with forum/topic titles in the URL: context.MapRoute("ShowTopic", "Forum/Topic/{id}/{title}", new {…
2
votes
1 answer

UrlHelperExtensions.Page Method for Areas

How can one include an Area in the UrlHelperExtensions.Page Method? The docs don't mention areas. When I want to link to a page in an area (in my case Identity) the page name is not found: var callbackUrl = Url.Page( …
Bijan
  • 25,559
  • 8
  • 79
  • 71
2
votes
2 answers

ASP.NET MVC areas return blank view

I have one ASP.NET MVC application which also has areas in it. For short URL I have set route all actionmethods with short URLs in RouteConfig of areas like below. //admin dashboard having short URL admin/dashboard context.MapRoute( …
3 rules
  • 1,359
  • 3
  • 26
  • 54
2
votes
1 answer

.net core routing to a razor pages area based on current domain name?

I'm currently trying to architect a application to host multiple websites from a single .net core application. Ideally, I would like to show completely different Razor pages based on the domain name the application is being accessed from. Ideally, I…
IMelancon
  • 21
  • 2
2
votes
0 answers

Asp.NET MVC - Combining Two Project

I have two different mvc (and it's own layers) project in a solution. I decided to combine these project, these will have same layout, contents etc. But, I also want to keep layers seperately. So, should I open an area for project2 in project1 or…
berkan
  • 722
  • 1
  • 7
  • 23
2
votes
1 answer

Route Values for Area (MVC3)

I am using areas in MVC version 3. My logoff and logon action methods are routing to the area, and I need them to route to the normal controller that is not in an area. I have tried the following host://AREA/CONTROLLER/METHOD instead of…
Jim
  • 14,952
  • 15
  • 80
  • 167