Posted on: 9/18/2014 8:25:11 AM | Views : 467

I have a question about best practices for using reusable content. I've built my controllers and their views and now want to 'distill' their essence and reuse them across the site. For example:
Consolidated content:
A frontpage which contains customised content from multiple controllers in a summarised form.
Eg: Latest headlines, schedule for the coming week, recent posts, messages, etc. 
Sidebar content:
Content which is available from every page in the site.
Adverts, Links to favourite sites, friends on-line, etc. 
There are 2 approaches that I know of.
1)      Add the relevant repositories to each page, and use them to generate the content.
2)      Use Html.RenderAction from within views, and avoid the above.
I intend to use Html.RenderAction as it appears to be the ‘cleanest’. Are there any poten ...

Go to the complete details ...