- 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.
- CorelDRAW X6 中文版圖形設計實戰從入門到精通
- 網管員典藏書架:網絡管理與運維實戰寶典
- Twilio Cookbook
- 從區塊鏈到Web3:構建未來互聯網生態
- 物聯網之魂:物聯網協議與物聯網操作系統
- 面向云平臺的物聯網多源異構信息融合方法
- 世界互聯網發展報告·2019
- Mastering JavaFX 10
- Getting Started with Grunt:The JavaScript Task Runner
- 中國互聯網發展報告2018
- Unity Artificial Intelligence Programming
- 5G時代的大數據技術架構和關鍵技術詳解
- Implementing NetScaler VPX?
- 現代通信系統(第5版)
- 云計算技術與標準化