How to serve content from another assembly

How do you put views and content in a separate assembly that can be referenced from MvcApplication?

+6
asp.net-mvc-2
source share
3 answers

Sounds like you're talking about portable areas. Craig Shoemaker The Polymorphic Podcast had a recent episode featuring Jeffrey Palermo and Eric Hexter , and they discussed portable areas and what they are.

A link to the Los Techies article appeared in the notes for the show, which is a great β€œpractical” way to get started with portable areas.

The short answer is that you need to compile the project with the appropriate dependencies and set the build action for all views as embedded resources.

+3
source share

AFAIK, there is no direct way to use webforms (.aspx) as a representation. However, you can use other viewing mechanisms (e.g. Stringtemplate ) and embed pages and images as resources in the dll . You will need to implement:

  • Own viewer
  • Image and other resources (css, js, etc.) serving the controllers.

Hope this makes sense ...

+1
source share

quite simply when you process your routing -> direct it to the assembly and the class that handles this.

but do not forget that you need to implement several things. I assume you understand this.

+1
source share

All Articles