Storing Editor Templates in external library

佐手、 提交于 2019-12-22 11:29:11

问题


Is it possible to create Editor Templates in an external library so that they can be shared between applications? I'm not looking to store cshtml files in a library, just wondering if there was a way you can create them and store them like you do with html helpers. There are a few that i use quite a lot and it would be nice to have them all in a single library to reference.


回答1:


MVCContrib Portable Areas offers this functionality. Out of the box there is nothing built-in. You will need to roll your custom VirtualPathProvider if you wanted to embed views into a separate assembly. You may also find the following blog post useful.



来源:https://stackoverflow.com/questions/5155413/storing-editor-templates-in-external-library

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