开发者

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?


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


Look at "portable areas."

http://www.lostechies.com/blogs/hex/archive/2009/11/01/asp-net-mvc-portable-areas-via-mvccontrib.aspx

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜