Posted on Fri 15 January 2010
The 'areas' feature of ASP.NET MVC 2 (as of preview 2), provides an easy way to separate sections of an application, so controllers and views can be grouped together.
There are a couple of issues an issue with this though, that would be great to be ironed out for the final release. Firstly, there is no support for areas within Visual Studio; controllers and views both have right-click context menu options to allow quick creation but there is no similar behaviour for areas with no default folders created for you. Secondly when you have created a view in the new area, you will get a parser error of something like 'Could not load type 'System.Web.Mvc.ViewPage''.
This error comes from not having a web.config file in the new area's views folder (another reasons to have Visual Studio create the areas folder for you). This can easily be rectified though, simply by copying the web.config from the views folder in the root directory. A simple fix for a simple problem, but one that could easily be avoided!
Permalink
|
Comments (0)
Tags: asp.net, mvc.
Categories: ASP.NET | ASP.NET MVC.
Comments
< go back to the main blog page