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.
1) Layouts (same as asp.net master pages, not covered in this post)
2) Partial views
Here’s how.
Shows the create page, using the Html.Partial extension method
Shows the edit page, using the Html.Partial extension method on the same partial view as well
Shows the partial view that gets injected (for want of a better word) into the two views shown previously.