Đang chuẩn bị nút TẢI XUỐNG, xin hãy chờ
Tải xuống
Hoàn thành các ứng dụng hiển thị cho bạn tất cả các phần tương tác như thế nào Chìa khóa đến 4 ASP.NET làm chủ là có rất nhiều ứng dụng thực tế hướng dẫn bạn trong việc sử dụng các kỹ năng bạn đang học tập . | Chapter 9 How to use master pages 325 A content page in Design view Description When you display a content page in Design view the elements from the master page are displayed so you can see how they will affect the final appearance of the page. To add the content for a page click the Content control. Then you can type text or use the Toolbox to drag controls into the content area of the page. Any text or other elements you add will be placed between the start and end tags of the Content element in the aspx file. If you want to display only the master page s default content for a page click the Smart Tag icon in the upper right comer of the Content Control and choose Default to Master s Content. Then you won t be able to edit the content of the content area. To edit the content again choose Create Custom Content from the smart tag menu. Figure 9-7 How to add content to a page Download from Wow eBook www.wowebook.com 326 Section 2 Basic ASP.NET skills The aspx code for the Order content page To help you understand how content is added to a content page figure 9-8 presents the aspx code for the Order page of the Halloween Store application. As you can see this code includes two Content controls. The first one includes a link element that identifies the external style sheet used by the page. When the Order page is displayed the styles in this style sheet will be combined with the styles in the external style sheet identified by the master page. The second Content control contains the main content for the page. This is the same content that would normally be included in the form element of a standard page. Because of that you shouldn t have any trouble understanding it. Download from Wow eBook www.wowebook.com Chapter 9 How to use master pages 327 The aspx code for the content page Page Languages VB MasterPageFile Site.master AutoEventWireups false CodeFiles Order.aspx.vb Inheritss Order asp Content IDs Headercontent ContentPlaceHolderlDs Headcontent runats server clink