What is the correct place for Partial Views in ASP.NET MVC?

自古美人都是妖i 提交于 2019-12-03 04:12:42

I believe you are correct. Here is an example of something I do, general navigation partial views in my Shared directory. and then a partial views for a specific Controller in the Views/[ControllerName] Directory.

I think, you're absolutely right!

Views in the "Views/Shared" folder you can access from all controllers and actions. Views in the "Views/[ControllerName]" folder are for controller specific views only (even if there are possibilities to access them from other controllers).

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