Sharing Views between ASP.NET MVC 3 Web Application Projects

I have several ASP.NET MVC 3 web applications with a lot of shared objects:

  • The same input controller. Several differences between their login systems are recorded in files web.config.
  • Title / Details: invoices, payment orders, payment orders, etc.

To make my code less redundant, I moved the general controllers and views to a separate class library (the models were already in their own class libraries). Some time later, I discovered how to call controllers in external assemblies , but I still don't know how to call views in external assemblies. How to do it?

+5
source share
1 answer

You can watch MVCContrib Portable . They allow you to compile the entire MVC application area into a single assembly, including controllers, views, and supporting files such as JavaScript and CSS. I worked on a large project that made extensive use of them, and they work well, especially when combined with T4MVC .

+6
source

All Articles