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

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
主站蜘蛛池模板: 晋城| 资兴市| 金沙县| 邢台市| 洛川县| 岳西县| 郧西县| 勐海县| 金塔县| 盐山县| 基隆市| 搜索| 荣昌县| 广丰县| 霍城县| 文山县| 嵊州市| 阿合奇县| 工布江达县| 昌都县| 会理县| 绍兴县| 西华县| 称多县| 屏东市| 宁国市| 桑植县| 中超| 长泰县| 马山县| 保康县| 崇信县| 贵德县| 丰原市| 沧州市| 双辽市| 北海市| 南华县| 琼海市| 浙江省| 文登市|