30

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
  • 1
    Remember to RESTART IIS Express after each change or tweak because it caches the locations, files and apparently results even though I set it not too, and all that. I was banging my head and then realised after restarting IIS that it all worked without existing file name, without it being an embedded resource, as long as it had '.cshtml' and made sure I overrode the directory bit too. THanks you helped me partially create my solutions. Phew! Commented Jul 14, 2014 at 15:53

1 Answer 1

23

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.

Sign up to request clarification or add additional context in comments.

3 Comments

Link is broken.
@Darin Dimitrov Link is broken can you share it again ?

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.