- 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 中文版圖形設計實戰(zhàn)從入門到精通
- Application Development with Qt Creator(Second Edition)
- 物聯(lián)網(wǎng)安全(原書第2版)
- 農(nóng)產(chǎn)品物聯(lián)網(wǎng)研究與應用
- 信息通信網(wǎng)絡建設安全管理概要2
- 網(wǎng)絡的琴弦:玩轉IP看監(jiān)控
- IPv6網(wǎng)絡切片:使能千行百業(yè)新體驗
- OMNeT++與網(wǎng)絡仿真
- SAE原理與網(wǎng)絡規(guī)劃
- Android UI Design
- 園區(qū)網(wǎng)絡架構與技術
- Guide to NoSQL with Azure Cosmos DB
- 中國信息化年鑒2017
- 互聯(lián)網(wǎng)戰(zhàn)略變革與未來
- 視聽變革:廣電的新媒體戰(zhàn)略