Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Reuse an MVC area in multiple MVC applications?

I have some common web pages that will be in multiple MVC applications. For those pages I'd like to reuse the same source code (controllers + views) between the different MVC web sites. What is the best way to go about doing this?

ASP.NET MVC areas seem like one possibility but they just a sub directory of the website project. Is it possible to reuse an MVC area in multiple MVC applications?

like image 543
James Newton-King Avatar asked May 15 '10 13:05

James Newton-King


1 Answers

You could embed views into assemblies and implement a custom VirtualPathProvider.

like image 159
Darin Dimitrov Avatar answered Sep 17 '22 19:09

Darin Dimitrov