ASP.NET MVC Beta - Grouping Controllers And Views Possible?
I am on the way to build an ASP.NET MVC application with the latest beta release and I wonder if it is possible to change the default project Layout of
/Views/Home/Index.aspx /Views/Home/About.aspx
to
/Blog/Views/Home/Index.aspx /Blog/Views/Home/About.aspx
/Forum/Views/Home/Index.aspx /Forum/Views/Home/About.aspx
The goal is to get some separation between "applications" within one single Web project, something like Thomas Owens asked already here: Under an MVC framework, which directory structure would be expected by other developers?
Of course this should include the Controllers as well, not only the Views.
Answer
This is not a new concept. It is called "areas" in Monorail. There has been a lot of buzz about this topic lately on the ATL.NET forum and elsewhere. Steve Sanderson has come up with a way to do this but apparently it leaves some issues. In reseponse, apparently the MVC team is going to take a "deep look" at it for a future release.
Related Questions
- → Function Undefined in Axios promise
- → React formatting dates with momentjs server side
- → AngularJS directive: "templateUrl" doesn't work while "template" works
- → how to add cannonical tag for ASPX .NET page
- → JavaScript in MVC 5 not being read?
- → URL routing requires /Home/Page?page=1 instead of /Home/Page/1
- → ASP.NET routing w/ changing article name
- → NumericTextBox Loses Value using Html.TextBoxFor, not HTML
- → How to do Bundling of css & js files in Drupal
- → Does the fact that every page is reachable through www.example.com and www.example.com/index have any SEO impact?
- → How to add rich snippet in a website?
- → UrlRewriting does not work on server, but on localhost it works fine on asp.net?
- → Bootstrap Nav Collapse via Data Attributes Not Working