- Hands-On Full:Stack Web Development with ASP.NET Core
- Tamir Dresher Amir Zuker Shay Friedman
- 170字
- 2021-06-10 19:37:25
View files and their location
View files are saved with the extension .cshtml, which implies that these are files containing both HTML markup and C# code.
They are located within subfolders under the Views folder. By convention, each subfolder matches a single controller. For example, if the project has a controller named HomeController, then the views of this controller will reside inside the Views/Home folder.
The view's filename correlates to the controller action for which it generates the output. We saw in the previous section that the controller action ended with this line:
return View();
This line tells ASP.NET Core MVC to look for a file named <current action name>.cshtml under Views/<controller name>. For example, if the controller is named HomeController and the action is named Index, then the view file will be Views/Home/Index.cshtml.
- RCNP實驗指南:構建高級的路由互聯網絡(BARI)
- 數據通信網絡實踐:基礎知識與交換機技術
- 物聯網工程規劃技術
- 物聯網安全(原書第2版)
- Building Django 2.0 Web Applications
- 社交電商運營策略、技巧與實操
- TCP/IP入門經典(第5版)
- 計算機網絡與數據通信
- 局域網組建、管理與維護項目教程(Windows Server 2003)
- Building RESTful Web Services with Spring 5(Second Edition)
- 區塊鏈輕松上手:原理、源碼、搭建與應用
- IPv6網絡切片:使能千行百業新體驗
- Bonita Open Solution 5.x Essentials
- jQuery Mobile Web Development Essentials
- 物聯網工程概論