重新组织 ASP.NET MVC 文件夹结构
我的 MVC 站点有几个部分和子部分,我希望文件夹布局的结构与默认结构不同。例如,如果我的网站有 5 个主要部分,我希望有 5 个文件夹,然后每个文件夹中的模型视图控制器文件夹。有人对我如何实现这个可能有不同的想法有任何建议吗?我是否必须在 global.ascx 文件中设置自定义路由?
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?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
考虑在 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
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