To add an MVC View, perform the following:
In the Solution Explorer window, expand Views.
Right-click Home, point to Add, and then click View.
The Add Scaffold dialog box appears.
Select MVC 5 View from the center pane of the Add Scaffold dialog box, and then click Add.
The Add View dialog box appears. You can now set the View creation properties.
In the View name box, enter a View name.
In the Template list, select a template to be used for scaffolding the View code.
From the Model class list, select the DataModel.
Select a Layout page to give the site a default style that can be applied to all Views.
Note: You can use the default layout or design a Layout page to suit the user interface of your site.
Click Add.
A new View <MVCViewName>.cshtml appears under the Views folder, in the Solution Explorer window. The <MVCViewName>.cshtml file contains the generated Razor code for handling the display, input, and default validation for the fields defined in the <SegmentName>.<TechnologyFolderName>.DataModel generated by the Client Framework application.
The first line of code automatically references the model name that is used by the View to insert or extract data from an instance of the DataModel at runtime.
For example,
@model <SegmentName>.<TechnologyFolderName>.DataModels.Models.<IspecName>Model @{ ViewBag.Title = "<MVCViewName>"; }
Note: The Razor View is a combination of HTML tags and C# code that is processed by the Razor View Engine. The processing happens on the server and the resulting HTML is sent to the browser for display.