Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.
We often want to use the same fragments of Razor markup in several different places. Rather than duplicate the markup, we use partial views. These are separate view files that contain fragments of markup and can be included in other views.
In this section, we will show you how to create and use partial views, explain how they work, and demonstrate the techniques available for passing view data to a partial view.