Adding a View
In the section “Specifying a View,” you learned how a controller specifies a view. But how does that view get created in the first place? You could certainly create a file by hand and add it to your Views directory, but the ASP.NET MVC tooling for Visual Studio makes it very easy to add a view using the Add View dialog.
Understanding the Add View Dialog Options
For this example, you'll add a new action method named Edit and then create a view for that action using the Add View dialog. To launch this dialog, right-click within an action method and select Add View (see Figure 3.2).
This brings up the Add View dialog shown in Figure 3.3. The following list describes each menu item in detail:
When launching this dialog from the context of an action method, the view name is prepopulated using the name of the action method. Naturally, the view name is required.