
The Views/_ViewStart.cshtml file brings in the Views/Shared/_Layout.cshtml file to each view. The changes were made once in the layout template and all pages on the site reflect the new link text and new title.Įxamine the Views/_ViewStart.cshtml file: = "_Layout"
#Return policy for mac app movie
Notice that the title and anchor text display Movie App. Notice how the title on the browser tab displays Privacy Policy - Movie App instead of Privacy Policy - MvcMovie: Save the changes and select the Privacy link. At this point, the Movie App link isn't functional. Note: The Movies controller hasn't been implemented. In the preceding markup, the asp-area="" anchor Tag Helper attribute and attribute value was omitted because this app isn't using Areas.

Open the Views/Shared/_Layout.cshtml file. The menu layout is implemented in the Views/Shared/_Layout.cshtml file. Select the menu links MvcMovie, Home, and Privacy. The following image shows the string "Hello from our View Template!" hard-coded in the view: The view template /Views/HelloWorld/Index.cshtml is used. The default view has the same name as the action method, Index in this example. When the view file name isn't specified, the default view is returned. The Index method in the HelloWorldController ran the statement return View(), which specified that the method should use a view template file to render a response to the browser.Ī view template file name wasn't specified, so MVC defaulted to using the default view file. Replace the contents of the Views/HelloWorld/Index.cshtml Razor view file with the following: = "Index"


Right-click on the Views/HelloWorld folder, and then Add > New Item. Right-click on the Views folder, and then Add > New Folder and name the folder HelloWorld.
