Pages for mac tutorial 2015

broken image

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' Add a new file to the Views/HelloWorld folder, and name it Index.cshtml.įor Visual Studio for Mac, see the.Add a new folder named Views/HelloWorld.In the search box in the upper-right, enter viewĪdd an Index view for the HelloWorldController:.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.