Reorganizing an ASP.NET MVC folder structure

与世无争的帅哥 提交于 2019-12-24 09:09:49

问题


I have several sections and subsections of my MVC site, which I would like to have the folder layout to be structured differently than the default structure. For example if I have 5 main sections of the site, I would like to have 5 folders and then the models views controllers folders within each of those. Does anyone have any recommendations how I would accomplish this maybe a different idea? And would I have to set up custom routing in my global.ascx file?


回答1:


Consider using Areas in MVC

http://msdn.microsoft.com/en-us/library/ee671793.aspx

http://devlicio.us/blogs/billy_mccafferty/archive/2009/01/22/mvc-quot-areas-quot-as-hierarchical-subfolders-under-views.aspx



来源:https://stackoverflow.com/questions/4515996/reorganizing-an-asp-net-mvc-folder-structure

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!