开发者

Sharing partial views between MVC projects - Do Areas Help?

We have some partial views which need to be used in 开发者_如何学编程several MVC projects. Has anyone done this successfully?

Could Areas in MVC 2 be of any use ? Could a sub area project use a partial view from the parent project or the other way around?

Thank you !


AFAIK Areas is for separating One Project to different sections.


I would consider creating either a separate library — not ideal for isolating UI logic — or a code template — very much like other Visual Studio components, e.g. starter kits, do it. In this case, you can encapsulate reusable UI components across projects.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜