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
large web application into multiple
projects, each of which can be
developed in relati...
So we finally got "areas" in our ASP.NET MVC framework! I'm able to get them up and going but one thing that bothers me is the amount of development servers it instantiates! So I currently have 6 areas, and when I run it I get 6 dev server instances running. Is this really necessary? MSDN is having me setup these areas as seperate we...
I know to start using areas, you have to establish parent/child relationships. I have a couple areas setup and their controllers are hitting just fine, the problem is some Views are not found. I'm trying to gain an understanding of what's happening to my controllers that are not happening with my Views.
I'm very familiar with MSDN's l...
Hi
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 don't.
The error is:
The controller name 'Home' is ambiguous between the followin...
Hello.
My folder look like this:
(root)/Areas/Admin/Views/..
(root)/Areas/Admin/Controllers/...
(root)/Areas/Admin/Routes.cs
(root)/Areas/Forum/Views/..
(root)/Areas/Forum/Controllers/...
(root)/Areas/Forum/Routes.cs
public class Routes : AreaRegistration
{
public override string AreaName
{
get { return "Admin"; }
...
Why default factory WON'T return full name of the controllers (with namespaces)?
I'm using Service Locator and autofac.
using System.Web.Mvc;
using Microsoft.Practices.ServiceLocation;
namespace Application.Core.MVC
{
public override IController CreateController(System.Web.Routing.RequestContext requestContext, string **contr...
The link for logging in looks like this:
<%= Html.ActionLink("Log On", "LogOn", "Account") %>
which yields the following link in the browser:
http://localhost:2300/Account/LogOn
However, if I switch to an Area, such as Content, the Login link now looks like this:
http://localhost:2300/Content/Account/LogOn
...which fails of cour...
I've followed Phil Haack's demo of jQuery Grid successfully in an mvc 2 rc project without areas. Now I'm trying to implement the same code in an areas project but the data is not being passed to the grid.
The jquery grid url property from the demo appears to be in the format of:
url:'/{controller}/{method}/'
I'm attempting to inclu...
I am just trying out Areas in ASP.NET MVC 2 and I've hit a small issue.
I've added the appropriate lines to my project file:
<Target Name="AfterBuild" DependsOnTargets="AfterBuildCompiler">
<PropertyGroup>
<AreasManifestDir>$(ProjectDir)\..\Manifests</AreasManifestDir>
</PropertyGroup>
<CreateAreaManifest AreaName="$...
My controller has to enumerate all the areas in the application. Is it possible? And how?
...
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 the same model classes in the root Models folder?
My project differs Domain Model and Vi...
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 I present here will allow you to keep your area specific views in each area. If your proj...
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 specified the Area in the URL. To make matters worse - it doesn't seem to know it's under Admin...
Hello,
Try to ASP.NET MVC 2 Areas and have a problem. I have a User Area and a Blog area. User area is working properly but when I use my Blog area the controllerType is null in my GetControllerInstance. I have not made any changes in my areas so everything is as it was when I created them. I Have also tried to add a test area with name ...
I've created an Area named "Admin". I've created also a controller(Pages) and a view(List) in this areas.
When I run my app and enter the url "/Admin/Pages/List" I'm getting an The resource cannot be found error.
When I enter /Pages/List, the Action method is hit but the view is not found,because the app is searching in wrong directori...
have an action that generates active vacancies. The code is below;
public ViewResult OpenVacancies()
{
var openvacancies = db.GetActiveVacancies();
return View(openvacancies);
}
I want to use this list on several pages so i guess the best thing to use is html.renderaction (please correct me if i ...
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 Views and Controllers folder? What does creating an area really get me?
I fail to see much ...
Hello,
I've got my ASP.NET MVC 2 application divided into few areas. One of them is a default area in main catalog, the other is Account area in Areas catalog. Now the problem is, that I need to use the same view in controllers from both of this areas.
Now If they would be in the same area I will just return View("ViewName") and it's o...
I'm trying to include a partial in a view. Both the partial and the view are in an MVC Portable Area. Here's the code in the view:
<% Html.RenderPartial("Here"); %>
Here's the partial (named Here.ascx and located in the Shared folder of my portable area):
<%@ Control Language="C#" Inherits="System.Web.Mvc.ViewUserControl<dynamic>" ...
Do Areas in Mvc2 have session isolation or do they share the same session as the rest of the application for the same user.
...