Storing ASP.Net MVC Views in the Database

▼魔方 西西 提交于 2019-11-27 05:03:35

问题


For an ASP.Net MVC application, I'm interested in storing some views and/or partial views in the database so that a few semi-technical users can do some basic view logic. Does anyone have any tips or lessons from experience on doing this?

I know Phil Haack wrote a blog post on this about a year ago. He used IronRuby for scripting his views, (which would be fine for me). He created a quick proof-of-concept, but I can't find any other information on the topic.

Any ideas, thoughts, tips, etc would be appreciated.

Thanks!


回答1:


Here you go. All that you need is to write a custom VirtualPathProvider and register it within the ASP.NET hosting environment. Works also with classic WebForms.



来源:https://stackoverflow.com/questions/2457164/storing-asp-net-mvc-views-in-the-database

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