开发者

Storing Editor Templates in external library

开发者 https://www.devze.com 2023-02-13 23:09 出处:网络
Is it possible to crea开发者_开发问答te 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 t

Is it possible to crea开发者_开发问答te 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.


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.

0

精彩评论

暂无评论...
验证码 换一张
取 消