官术网_书友最值得收藏!

Views

After we've talked about how the application works from the server side, it's time to look at the client side. In this chapter, we will cover the visual side of a Model-View-Controller (MVC) app: the views.

A view in this context is a combination of HyperText Markup Language (HTML) and code that executes on the server side and whose output is combined and sent to the client at the end of the request.

To help achieve consistency and reusability, ASP.NET Core offers a couple of mechanisms, page layouts, and partial views that can be very handy. Also, because we may want to support different languages and cultures, we have built-in localization support, which helps provide a better user experience.

In this chapter, we will learn the following:

  • What are Razor views
  • What are partial views
  • What are view layouts
  • What are the base Razor view classes
  • How Razor finds view files
  • How to inject services into a view
  • What is a location expander
  • How to perform view localization
  • How to mix code and markup on a view
  • How to enable view compilation upon publishing
主站蜘蛛池模板: 松阳县| 本溪| 南江县| 宝清县| 沿河| 阿坝| 五原县| 舞钢市| 顺昌县| 肥乡县| 花莲市| 绩溪县| 宣恩县| 阿荣旗| 武胜县| 双牌县| 和硕县| 江源县| 遵义县| 同仁县| 建瓯市| 手游| 东明县| 福鼎市| 大同县| 聂荣县| 泗洪县| 赣榆县| 蚌埠市| 电白县| 乐至县| 习水县| 博爱县| 台湾省| 中牟县| 昌吉市| 闽侯县| 柳江县| 图片| 临朐县| 绥阳县|