Creating the View

The missing piece of our example application is the view. To create a view, right-click the Index action method and select Add View from the pop-up menu, as shown in Figure 23-5.

images

Figure 23-5. Creating a view for an action method

The Add View dialog will appear, as shown in Figure 23-6. This is our opportunity to configure the view.

images

Figure 23-6. The Add View dialog

Visual Studio sets the view name to Index, which will make this the default view for the Index action method. Ensure that the options in the dialog match the ...

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

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.