DRY out your MVC Views
February 09, 2011
For those of you that don’t know DRY : Don’t Repeat Yourself.
Take the following two screens
They are nearly identical.
MVC3/Razor provides two ways to make things DRYer.
-
Layouts (same as asp.net master pages, not covered in this post)
-
Partial views
Here’s how.