Đang chuẩn bị liên kết để tải về tài liệu:
ASP.NET 4 Unleased - p 29

Đang chuẩn bị nút TẢI XUỐNG, xin hãy chờ

254 Các công thức thống kê và tài chính được xây dựng trong kiểm soát đồ làm cho nó dễ dàng để thêm các phân tích mạnh mẽ để ứng dụng web của bạn với các mã tùy chỉnh nhỏ. Trong quá khứ, thêm vào những thứ như striplines và thực hiện tính toán bổ sung vào một loạt dữ liệu đã được hoặc là một cái gì đó bạn phải mã chính mình hoặc cái gì đó mà chi phí rất nhiều thêm tiền khi mua điều khiển biểu đồ từ nhà cung cấp. Với ASP.NET 4, tất cả các. | 254 CHAPTER 5 Designing Websites with Master Pages FIGURE 5.5 Displaying a Master Page relative image. Registering Master Pages in Web Configuration You can apply a Master Page to every content page in a particular folder or every content page in an entire application. Rather than add a MasterPageFile attribute to individual content pages you can add a configuration option to the web configuration file. For example the web configuration file in Listing 5.12 applies the SimpleMaster.master Master Page to every page contained in the same folder or subfolder as the web configuration file. LISTING 5.12 FolderA Web.Config xml version 1.0 configuration system.web pages masterPageFile SimpleMaster.master system.web configuration The Master Page is applied only to content pages. If a page does not contain any Content controls it is a normal ASP.NET page the Master Page is ignored. From the Library of Wow eBook Modifying Master Page Content 255 You can override the Master Page configured in the web configuration file in the case of a particular content page. In other words a MasterPageFile attribute in a content page takes precedence over a Master Page specified in the web configuration file. Modifying Master Page Content Master Pages enable you to display the same content in multiple content pages. You quickly discover that you need to override the content displayed by a Master Page in the case of particular content pages. For example normally the Master Page contains the opening and closing HTML tags including the title tag. This means that every content page displays the same title. Normally you want each page to display a unique title. In this section you learn multiple techniques of modifying Master Page content from a content page. Using the Title Attribute If you need to modify only the title displayed in each content page you can take advantage of the @ Page directive s Title attribute. This attribute accepts any string value. For example the page in Listing 5.13 .

TÀI LIỆU LIÊN QUAN
crossorigin="anonymous">
Đã phát hiện trình chặn quảng cáo AdBlock
Trang web này phụ thuộc vào doanh thu từ số lần hiển thị quảng cáo để tồn tại. Vui lòng tắt trình chặn quảng cáo của bạn hoặc tạm dừng tính năng chặn quảng cáo cho trang web này.