Questions tagged [areas]
77 questions
15
votes
2 answers
Return a view from a different area
I have my ASP.NET MVC 2 application divided into few areas. One of them is a default area in the main catalog, and the other is an Account area in the Areas catalog. Now, the problem is that I need to use the same view in controllers from both of…

Łukasz W.
- 9,538
- 5
- 38
- 63
11
votes
1 answer
Magento: How do I get observers to work in an external script?
As far as I can tell, when a script is run outside of Magento, observers are not invoked when an event is fired. Why? How do I fix it?
Below is the original issue that lead me to this question. The issue is that the observer that would apply…

Laizer
- 5,932
- 7
- 46
- 73
11
votes
2 answers
Areas in different project with ASP.NET MVC 4
I am working with ASP.NET MVC 4, and trying to have areas in separate projects.
I have been checking this thread where we are anticipated the non-supporting state of areas in different projects after ASP.NET MVC2:
What are the pros and cons of…

user2558401
- 111
- 1
- 1
- 3
7
votes
1 answer
Whats so great about the new MVC2 areas?
Could some one please explain the advantages and disadvantages of using the new MVC2 Areas feature?
I don't understand what is so great about them. If I am adding an admin area to my MVC application why not create a new Admin folder in the main…

Ryan Sampson
- 6,717
- 12
- 47
- 55
6
votes
2 answers
relative path in stylesheets within asp.net mvc areas
I have a project with the current structure
My Project
/Content
/Controller
/View
/Model
/Areas
/Area1
/View
/Controller
/Model
/Area2
/View
/Controller
/Model
All of the area…

zSynopsis
- 4,854
- 21
- 69
- 106
6
votes
1 answer
MVC with Areas -- Html.ActionLink returning wrong URL/Route?
I am using MVC3 and have Areas in my application. In general, everything works fine, I can navigate to my area (e.g. Admin=Area, Controller=Department) like this:
<%: Html.ActionLink("Departments", "DepartmentIndex", "Department", new { area =…

Raymond
- 3,382
- 5
- 43
- 67
6
votes
2 answers
ASP.NET MVC 2 RC 2 returns Area-specific controller when no area specified
I have a basic MVC 2 (RC2) site with one base-level controller ("Home"), and one area ("Admin") with one controller ("Abstract"). When i call http://website/Abstract - the Abstract controller in the Admin area gets called even though i haven't…

Bryan
- 535
- 1
- 4
- 8
6
votes
2 answers
ASP.NET MVC 2 Preview 2: Areas duplicate controller problem
I am continuing to enslave the MVC 2 thing: Areas...
Now I have two controllers with the same name (HomeController) in the main Controllers folder and in one of the Areas. Both have different namespaces so... theoretically should coexists, but they…

twk
- 3,122
- 2
- 26
- 36
6
votes
2 answers
How to implement Areas in ASP.NET MVC 1.0 to be most compatible with ASP.NET MVC 2.0
Until the preview release yesterday of ASP.NET MVC I had been desperately needing a feature like 'areas' but not known what it was called to be able to find it.
The preview release describes 'areas' as :
Areas - provide a means of dividing a
…

Simon_Weaver
- 140,023
- 84
- 646
- 689
4
votes
3 answers
ASP NET MVC Area routing/multiple routes issue in VB
I'm pretty inexperienced with .net and have just started learning MVC. I've hit an issue concerning multiple controllers being found:
"Multiple types were found that match the controller named 'reviews'. This can happen if the route that services…

Ian
- 99
- 3
- 9
4
votes
1 answer
Location of JavaScript files in ASP.NET Core Areas
I am creating an ASP.NET Core application that will contain several areas.
Where would I add JavaScript files that are specific to a certain area (usually I put them into the wwwroot\js Folder. Is there something like this for an area?)?

Alexander
- 1,021
- 6
- 20
- 38
4
votes
2 answers
A Solution for Maintaining Views in Single-Project Areas
I have only tried this in single project areas. So if anyone tries this in a multi-project areas solution please let us know.
Area support was added to MVC2. However the views for your controllers have to be in your main Views folder. The solution…

37Stars
- 2,489
- 20
- 23
4
votes
1 answer
ASP.NET MVC 2 RC areas and shared models
Once new area is created by the means of Visual Studio context menu, there are three folders: Controllers, Models, Views. Is it supposed that every area should have it's own model classes? Or is it acceptable/widely-used/good for all areas to share…

Anthony Serdyukov
- 4,268
- 4
- 31
- 37
3
votes
2 answers
How do I get ASP.NET MVC to set a default Controller and Action for an Area?
I've created a new ASP.NET MVC project with areas and I'm trying to set a controller action to be the default controller action if the user visits that area.
I added an area called 'Login' now I have Areas/Login/ and I added LoginController.
I am…

1110
- 7,829
- 55
- 176
- 334
3
votes
2 answers
T4MVC MVC2 Views in Areas not generated
I just create an empty MVC2 project. Add an Area and a controller and a view to it. Include T4MVC files into the project and run the custom tool.
Everything is generated except the ViewNames for the views in the Area.
My tree structure:
Areas …

Coz
- 558
- 7
- 15