Placing MVC between multiple projects

I have several MVC3 / 4 projects (in the same solution - they share the infrastructure and services project) for a number of applications. Each of the websites should have a common title.

What is the easiest way to do this? Is there a way to use _Layout.cshtml for multiple projects?

I want to avoid one project with several areas, because the applications are so diverse, and I want to avoid deploying the entire solution every time I make changes to one of the applications.

Is there an easy way to do this?

EDIT: thought about it a bit today ... as an alternative - how about having an html helper in my infrastructure project that returns an html header? This can then be used by all projects that reference it ... is it a good idea? no?

+4
source share
2 answers

We have this from our intranet currently using ASP.net forms. I want to switch to MVC, how I came across this post asking the same question as you. Looking for the β€œbest” way to share layout / title across multiple projects.

What we did (and possibly still) was to have HTML in the database, a common DLL that fetches these HTML mixes in variables (menus, etc.) and then calls the build function header.

This crashes when updating Header.dll, and you need to publish it everywhere. This is the best solution I have found for this problem, but if it were possible to access the views in the shared folder above the project, it would help a lot.

0
source

you can use custom "areas" or partial user views

-2
source

All Articles