R – Is right use strongly-typed partial views

asp.net-mvcoopstrongly-typed-view

I'm developing a little application in ASP.NET MVC.

This app has a lot of "HTML pieces" that are used many times with a little variance.

For this pieces, I'm using strongly-typed partial views.

My question is: This is the right way to reuse code in View layer? Is there some inconviniece to use partials views?

Thanks a lot.

Best Answer

Personally, I think it's a great way of reducing the duplication in your HTML and do it all the time. Just avoid doing things with them that you should be doing through nested master pages and so forth.

As a rule of thumb, you shouldn't have nested partial views.