Using Partial Views

Partial views are fragments of markup that we can insert into a view. They are more flexible than sections because we can use a partial view repeatedly. Partial views are usually kept in the Views/Shared folder. To create a partial view, right-click this folder and select Add Images View from the pop-up menu. Visual Studio will display the Add View dialog, as shown in Figure 25-12.

images

Figure 25-12. Creating a partial view

I have named the view RegistrationTableRow, checked the option to create a strongly typed view, and set the model ...

Get Applied ASP.NET 4 in Context now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.