开发者

Sharing partial views between MVC projects - Do Areas Help?

开发者 https://www.devze.com 2022-12-19 13:36 出处:网络
We have some partial views which need to be used in 开发者_如何学编程several MVC projects. Has anyone done this successfully?

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

精彩评论

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